- Newest
- Most votes
- Most comments
When your App Runner service is configured with a VPC connector for outbound traffic, all traffic from your service is routed through the VPC, including traffic to external services like Sendgrid and Hubspot. This is likely causing your timeout issues.
The problem is that when you use a VPC connector, your App Runner service needs a way to access the internet. Even though your security group allows all outbound traffic, the subnets you're using need to have a route to the internet. For private subnets (which are typically used with VPC connectors), this means you need a NAT Gateway or similar service to enable outbound internet access.
Here are some steps to troubleshoot and fix the issue:
-
Verify that the subnets you're using for your VPC connector are private subnets. Public subnets can cause errors with App Runner VPC connectors.
-
Check if these subnets have a route to the internet via a NAT Gateway in their route tables. Without this, your App Runner service won't be able to reach external APIs even with permissive security groups.
-
To confirm this is a networking issue, you could try connecting to these external services from an EC2 instance in the same VPC and subnets. If the EC2 instance also can't connect, it confirms the issue is with your VPC's outbound internet connectivity.
-
If you're using private subnets, ensure they have a route to a NAT Gateway in their route table to allow outbound internet access.
-
If you're still experiencing issues, you might want to check the VPC Flow Logs to see if traffic is being blocked somewhere or use the Network Reachability Analyzer to identify network misconfigurations.
The fact that your App Runner can connect to your RDS but not to external services suggests that internal VPC routing is working, but outbound internet access is not configured correctly.
Sources
When the service fails to connect to Amazon RDS or downstream service - AWS App Runner
Amazon VPC Lattice Troubleshooting Part 1 - Client to Amazon VPC Lattice Communication | AWS re:Post
Troubleshoot ETIMEDOUT error in my Lambda function | AWS re:Post
Relevant content
- asked a year ago
