admin管理员组文章数量:1287786
I have a C# application on .NET 6 running at AWS ECS Fargate. It calls AWS lambda function using AWS SDK. The C# code works well when the lambda runs less than 5 minutes, but gets the following exception when lambda runs more than 5 minutes.
Amazon.Lambda.AmazonLambdaException: Signature expired: 20250222T214100Z is now earlier than 20250222T215101Z
(20250222T215601Z - 5 min.).
It's the case when invoked lambda at 21:41:00, took 10 minutes (ended at 21:51:01), exception thrown after 15 minutes (21:56:01)
Found that the signature is sent at request using current timestamp and throws error if it is more than 5 minutes regardless of 15 minutes' timeout from lambda side.
If lambda runs 7 minutes, the lambda ran successfully but C# does not get respond and throws the exception after 15 minutes.
AWS Lambda is correctly setup to have 15 minutes timeout. AWS-SDK-NET are up to date.
var lambdaClient = new AmazonLambdaClient(new AmazonLambdaConfig
{
Timeout = TimeSpan.FromMinutes(15)
});
var request = new InvokeRequest
{
FunctionName = LAMBDA_FUNCTION_NAME,
InvocationType = InvocationType.RequestResponse,
Payload = PAYLOAD
};
var response = await lambdaClient.InvokeAsync(request);
There is an article with same issue
But using 'ResignRetries = true' makes the lambda run multiple times.
Is there anyway to increase signature timeout to more than 5 minutes?
本文标签: net coreSignature expired exception when AWS lambda runs more than 5 minutes from CStack Overflow
版权声明:本文标题:.net core - Signature expired exception when AWS lambda runs more than 5 minutes from C# - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741322316a2372275.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论