- Newest
- Most votes
- Most comments
Hello.
The RDS data api must be able to access the RDS service endpoints.
Therefore, it is thought that the timeout error is occurring because Lambda connected to the VPC cannot access the RDS service endpoint.
Therefore, try setting a route for NAT Gateway in the route table of the subnet to which Lambda is connected, or create a VPC endpoint for RDS.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.vpc-endpoint
By the way, Aurora Serverlessv2 MySQL allows you to use the Data API.
I think you can connect if the region you are using and the version of Aurora MySQL support the Data API.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.Aurora_Fea_Regions_DB-eng.Feature.Data_API.html#Concepts.Aurora_Fea_Regions_DB-eng.Feature.Data_API.ams
Also, check if the Data API is enabled.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.enabling
Relevant content
- asked 6 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
Thanks for your responding. I checked the document and found out that when choosing engine version, I chose the default which is 3.05, my region only support data-api if engine version is 3.07 or higher.