使用lambda函数URL超时错误持续时间更改AWS CloudFront分布
我有一个CDK堆栈,该堆栈创建了几个lambdas,可以通过新的CloudFront功能URL来调用查询参数,并调用API通过CloudFront Distribution将数据发送回客户端。这是通过lambdas本身(不是云范围的功能或lambda edge)完成的,我在XRARE中注意到,默认情况下有三秒钟的超时。我不知道配置在哪里,但是我想知道是否有一种方法可以将持续时间增加到其他东西,因为我从另一个API中摘下图像。
当我查询API时,所有错误都会出现3秒钟的错误并失败,但是API呼叫会恢复成功。
这是CloudFront Distribution,(我发现功能URL只允许获取请求,但它比必须旋转整个API来处理这些函数更容易了电话)
,如果您对lambda上的CloudFront Distributions创建函数URL感到好奇,这是我的代码:
有人知道如何配置功能调用时间限制,我有点困惑
I have a cdk stack that's creating a couple lambdas that take in query params and call api's to send data back to the client through a cloudfront distribution through the new cloudfront function urls. This is done through lambdas itself (not a cloudfront function or a lambda edge), and I've noticed through xray that there's a timeout at three seconds by default. I don't know where this is configured but I was wondering if there's a way to increase the duration to something else because I'm pulling images from another api.
All of the errors when I query the api and it takes 3 seconds error out and fail, but the api call comes back as successful.
Here's the cloudfront distribution, (also I've found that function urls only allow get requests, but it made life a bit easier than having to spin up a whole api to handle these calls)
And if you're curious on how to create function urls for cloudfront distributions on lambda, here is my code:
Does anyone know how to configure the function invocation time limit, I'm kinda stumped on this one
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用CDK配置lambda函数,则属性为'timeout',并且需要
If you're using CDK to configure your Lambda function then the attribute is 'timeout', and it takes a Duration.