2 Answers
- Newest
- Most votes
- Most comments
0
The following commands would need to be running on the back end to start the container.
Are you able to start the container with the port-forward tunnel open?
aws ssm start-session --target i-XXXXX --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"portNumber":["5432"],"localPortNumber":["5432"], "host":["XXXXX.rds.amazonaws.com"]}'
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
Hi, I'm sorry I don't get it. Do you suggest running the port-forward within the container ? That's not a solution neither, it's a container I can't modify, so I can't install the aws cli/ssm plugin in it.
No, it is your local PC that executes this command.
But what's the difference with the command I'm already running on the host machine ? I'm already running in from my local PC where I run the docker container. It just that the PC can connect to the DB but when in the container, it doesn't work.
To begin with, the IP address of the host is "172.17.0.1", is this correct?
Yes, if I test the connection with a local nginx for example, it works. It only doesn't work with the SSM port-forward. I've asked a friend of mine to test on MacOS, it seems to work. Looks like the issue is only with Linux.