Reputation: 935
I always have {"message": "Endpoint request timed out"}.
I use swagger and swagger ui for api.
What I did:
I think it's a small config I missed.
How can I investigate to understand what is the issue?
Would you have any ideas on the issue?
Upvotes: 0
Views: 6674
Reputation: 10416
If using API Gateway, it has a global timeout of 29 seconds for all Lambdas it serves, regardless of the Lambda timeout settings
Official docs under API Gateway quotas for configuring and running a REST API
Upvotes: 2
Reputation: 35238
This timeout will be the result of a network connectivity issue.
I would start off by saying you should keep this network connectivity between your Lambda and your RDS private. If the RDS is public you would need to whitelist to allow a large range of IPs to allow inbound access (to cover all Lambdas in the region). This means any Lambda could connect to your RDS.
Instead you should keep the RDS as a private instance and configure your Lambda to operate within a VPC. Then when your Lambda connects to the RDS it will be connecting via the private network without traversing the public internet.
Finally ensure that the security group for your RDS allows inbound access from either the security group attached to the Lambda (this is decided when you add the Lambda to the VPC) or the subnet CIDR ranges the Lambda lives in.
Upvotes: 1