Error TIMEOUT in lambda

0

Error Timeout is happening in lambda (which basically process and push event data to s3 bucket).

for more context: Timeout Error

Bhavesh
asked 19 days ago402 views
2 Answers
1

Hello.

Is this Lambda the one connected to the VPC?
In that case, try setting up a NAT Gateway or S3 VPC endpoint.
https://repost.aws/knowledge-center/lambda-vpc-troubleshoot-timeout
https://repost.aws/knowledge-center/internet-access-lambda-function

profile picture
EXPERT
answered 19 days ago
profile pictureAWS
EXPERT
iBehr
reviewed 19 days ago
  • we have s3 vpc endpoint in place which was working fine 3 days ago but for the last 2 days it is throwing this timeout error not able to figure the issue itself

0

Hi

If your AWS lambda is in a VPC, please set a VPC Endpoint for Amazon S3 [1]. If you have allready implemented the lambda in Amazon VPC, you should try the troubleshoot provided in the previous answer.

But first of all, configure the timeout in your Amazo Lambda. The default value is 3 seconds [2]. You can increase the default value into a grater value.

Double check if your Amazon Lambda function have access to Amazon S3 Service. You can modify the role and add the less privilage in order to use Amazon S3.

Hope this information helps you Best Regards

Edgar Hernández ITERA's Data & Analytics Manager

[1] VPC endpoints for Amazon S3. https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html

[2] Q: How long can an Amazon Lambda function execute? https://www.amazonaws.cn/en/lambda/faqs/#

profile picture
answered 19 days ago
  • we have s3 vpc endpoint in place which was working fine 3 days ago but for the last 2 days it is throwing this timeout error not able to figure the issue itself

  • Hi Bhavesh.

    What I recommend you to do is follow the troubleshoot that AWS have provided to you [1].

    But what it's importante to ask, Is What have changed? If that Lambda was working good, something change.

    Double Check the next topics:

    1. Code changes.
    2. Lambda configuration (timeout configuration)
    3. Network Changes (Subnet Route tables, VPC NACLs, VPC DNS Resolution)
    4. External Firewall and Amazon Security groups Changes (Lambda Security group)

    If there's a change, return it to the previous values.

    Best Regards Edgar Hernández ITERA's Data & Analytics Manager

    [1] Lambda VPC TroubleShoot - Timeout. https://repost.aws/knowledge-center/lambda-vpc-troubleshoot-timeout

  • we checked everything and it looks good we haven't changed anything vpc subnet routetable endpoint security group NACL everything is correct and cross-checked again still the issue persist it initially creates connection but then it breaks because of timeout is there any time limit like if there is no new updates comes to s3 it will break connection after sometime?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions