Hi @romasi
I’m not an expert on AWS networking, but I think you will need to specify the AWS internal DNS IP in your job.
Here’s the job that used for testing:
job "petclinic" {
datacenters = ["dc1"]
group "petclinic" {
network {
mode = "bridge"
dns {
servers = ["169.254.169.253"]
}
port "http" {}
}
task "petclinic" {
driver = "java"
config {
jar_path = "local/spring-petclinic-1.0.jar"
jvm_options = ["-Xmx512m", "-Xms256m", "-Dserver.port=${NOMAD_PORT_http}"]
}
artifact {
source = "https://github.com/lgfa29/spring-petclinic/releases/download/v1.0/spring-petclinic-1.0.jar"
destination = "local"
}
resources {
memory = 512
}
}
}
}
I’m not sure if the IP 169.254.169.253 is the same in all regions, so you might need to check the AWS documentation for more details.
I didn’t test this with RDS, but I think it would work as well. I was able to curl
internal hostnames and IPs without problems.
Give it a try and let me know how it goes