7

The AWS document states that

Using Async in C# Functions with AWS Lambda

If you know your Lambda function will require a long-running process, such as uploading large files to Amazon S3 or reading a large stream of records from DynamoDB, you can take advantage of the async/await pattern. By creating a handler with this signature, Lambda will execute the function synchronously and wait a maximum of 5 minutes for execution to complete before returning or timing out.

I feel very confused Lambda will

execute the function synchronously and wait a maximum of 5 minutes

When Lambda support up to 15 minutes of processing time. Does that mean if I put async on the handler, I can only process one event in 5 minutes?

2
  • @TheGeneral Thanks. I removed the broad part and would ask the AWS support instead. I do have some basic understanding about async in .NET and used both async/non async in Lambda integration. I will create an answer if I can get a definitive one from AWS support Commented Dec 28, 2018 at 3:44
  • 1
    This to me was an interesting question I have a feeling the documentation has not been updated and should read: "By creating a handler with this signature, Lambda will execute the function synchronously and wait a maximum of 15 minutes for execution to complete before returning or timing out." Commented Dec 28, 2018 at 13:02

2 Answers 2

7

The final answer of AWS support at the time:

  • The document was not up to date. It should run at maximum 15 minute timeout ( depend on the Lambda function configuration )
  • The async modifier does not change how AWS behave, they will just await it.
  • The behaviour diference is only on the .NET side
Sign up to request clarification or add additional context in comments.

2 Comments

"The behaviour diference is only on the .NET side" What does this mean?
The support meant that the difference is that of an await-ed async .NET function vs synchronous invocation. AWS do not do anything notable with it
0

AWS recently changed the timeout for Lamdba. The execution timeout is changed from 5 minutes to 15 minutes.

https://aws.amazon.com/about-aws/whats-new/2018/10/aws-lambda-supports-functions-that-can-run-up-to-15-minutes/

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.