1

When I ssh into the EB instance, I am able to connect to the RDS instance. However, once inside Docker (I have tested this by running bash under Docker), I am unable to connect to it. I am able to access the wider internet, however. I can ping google.com successfully.

How can I connect to this RDS instance?

1
  • Can you provide all the debugging and output you have done so far? What commands did you use on the host to test the connection? What commands to start the container and test? What is the host OS? Is the EB instance and RDS both in a VPC? Commented Mar 13, 2015 at 16:16

1 Answer 1

1

I think what's happening here is that the container doesn't actually get the IAM role from the host EC2 instance, it basically counts as a separate machine as far as AWS security goes.

One solution I have found is if you set your docker container's networking setup to 'host' all the traffic will appear as if it's from the host instance and things should work again. Unfortunately this has some downsides like no longer being able to map ports from the container.

You must log in to answer this question.