gpt4 book ai didi

c# - AWS lambda : async C# handler

转载 作者:行者123 更新时间:2023-11-30 15:14:42 24 4
gpt4 key购买 nike

AWS 文档指出

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.

我觉得Lambda会很困惑

execute the function synchronously and wait a maximum of 5 minutes

当 Lambda 支持最多 15 分钟的处理时间时。这是否意味着如果我在处理程序上设置异步,我只能在 5 分钟内处理一个事件?

最佳答案

AWS support当时的最终回答:

  • 文档不是最新的。它应该以最长 15 分钟的超时时间运行(取决于 Lambda 函数配置)
  • async 修饰符不会改变 AWS 的行为方式,他们只会等待它。
  • 行为差异仅在 .NET 方面

关于c# - AWS lambda : async C# handler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53953309/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com