Relative Content

Tag Archive for amazon-rdsamazon-ecsaws-fargateaws-application-load-balanceraws-security-group

AWS ECS service connecting to RDS instance fails when I add an ALB

I have a Laravel app that I’ve dockerized and the image is pushed to ECR. The app is connecting to an RDS database hosted on the same VPC. I’ve created a cluster and service on ECS. Without the ALB, I’m able to access the public IP assigned to the running task. The docker image is running a DB migration, and it’s successfully connecting and migrating the data, but once I’ve created the service and added an ALB, it’s building the app but fails on connecting to the RDS DB, saying that it timed out.
The security group for the ALB allows inbound traffic to port 80, and the security group for the service to ALB connection has inbound traffic allow all TCP from the ALB security group.