- Newest
- Most votes
- Most comments
I am able to connect from a docker container running on EC2 instance to Aurora & Aurora Serveless MySQL running in VPC with no public access. The only things I feel can impede connection are routing and / or security groups depending on the VPC setup.
- Is Aurora configured with Public or private access
- Are docker containers and aurora instances in the same VPC?
- Is the correct IP / subnet allowed access in RDS security group? Do you have the correct outbound allow access?
- What error do you get when trying to connect to Aurora mysql?
You can try debugging by installing a mysql docker container on an EC2 instance and testing connection to aurora.
--Syd
Hello there,
From the notes, I understand that you are unable to connect to aurora MySQL from docker container. Please correct me if I misunderstood.
Thank you for sharing your setup details.
Please note that when encountering issues connecting to your RDS instance, you can check the following:
- The DB instance security groups allows the right ports on inbound.
- Ensure that you are connecting to the correct endpoint
- The route table associated with the subnet, should allow traffic routing (have an internet gateway).
- If your DB instance is in a private subnet, be sure to use VPC peering or AWS Site-to-Site VPN to connect to your instance securely. Check document for more information on VPC peering [1] and Site-to-Site VPN [2].
- Ensure that your NACLs have rules that allows inbound and outbound traffic to and from your DB instance.
You may refer to the following document [3].
Meanwhile if you have further questions or require any guidance, please do not hesitate to reach out back to me. It would be my pleasure to assist you.
Have a great day.
References:
[1] https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html [2] https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html [3] https://aws.amazon.com/premiumsupport/knowledge-center/rds-cannot-connect/ [4]https://docs.aws.amazon.com/vpc/latest/userguide/vpc-peering.html
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
Is Aurora configured with Public or private access : A.It has public access Are docker containers and aurora instances in the same VPC?: B .No Is the correct IP / subnet allowed access in RDS security group? Do you have the correct outbound allow access? IP is allowed in RDS security group and yes What error do you get when trying to connect to Aurora mysql?: connection is established but facing CDB Exception,