0

I always have {"message": "Endpoint request timed out"}.

I use swagger and swagger ui for api.

What I did:

  1. Created a mysql db in RDS
  2. Ensure everything works and is connected (Yes) with publicly accessibble
  3. Created a Lambda function to wrap my existing aspnet core project
  4. Added the custom runtime to support 2.2
  5. Published my lambda function
  6. Setup the permission between the vpc and the role
  7. When I try to access my lambda function I always have: {"message": "Endpoint request timed out"}

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?

1
  • Did you get it figured out? I am getting a timeout trying to write the AWS Event bus. Commented Sep 5, 2023 at 23:05

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.