- Newest
- Most votes
- Most comments
The connectivity issues you're experiencing between your AWS App Runner service and RDS MySQL database are not uncommon and can be caused by several factors. Here are some potential reasons and suggestions to address the problem:
-
VPC Configuration: Ensure that your VPC Connector for App Runner is using private subnets, not public ones. Public subnets can cause connectivity errors due to the lack of public IP space for the underlying Hyperplane ENIs.
-
Security Group Rules: Verify that the security group rules for both the VPC Connector and the RDS instance allow proper communication between them. Make sure the inbound and outbound rules are correctly configured.
-
Subnet Configuration: If you're using public subnets, consider creating new private subnets, routing existing public subnets via NAT gateways, or modifying the security group rules to improve connectivity.
-
Initial Deployment Issues: Some users have reported that App Runner can take a considerable amount of time (sometimes hours) to establish stable connections on initial deployment. This could explain why connectivity is intermittent or fails after pausing and restarting.
-
Network Reachability: Use the AWS Network Reachability Analyzer tool to identify any network misconfigurations between the App Runner service and the RDS instance.
-
ENI Flow Logs: Enable and check the Hyperplane ENI flow logs to determine if traffic is entering the ENI. This can help identify if the issue is at the network interface level.
-
Authentication Method: Ensure you're using the correct authentication method for MySQL. Some users have reported issues when using 'caching_sha2_password' instead of 'mysql_native_password' for user authentication.
-
Environment Variables: Double-check that your environment variables in App Runner are correctly set, especially if you're using AWS Secrets Manager for database credentials.
If the issue persists after checking these points, it may be worth contacting AWS Support for further assistance, as there could be underlying infrastructure issues or transient networking problems that need to be addressed at the AWS level.
Sources
When the service fails to connect to Amazon RDS or downstream service - AWS App Runner
App Runner unable to access internet or RDS on initial startup | AWS re:Post
Access to a Mysql RDS through Apprunner | AWS re:Post
Relevant content
- asked 9 months ago
