[英]I get "InvalidSignatureException: Signature expired" when Lambda is invoked
I have the following architecture:我有以下架构:
S3 ---> S3 Notification ---> SQS ---> Lambda
Sometimes, I'm getting the following error message from the Lambda (of course the times are different):有时,我从 Lambda 收到以下错误消息(当然时间不同):
"errorType": "Runtime.UnhandledPromiseRejection"
"errorMessage": "InvalidSignatureException: Signature expired: 20221230T132433Z is now earlier than 20221230T132603Z (20221230T133103Z - 5 min.)"
I have a retry policy in the SQS, so when the error occurs, the message returns to the SQS, and the Lambda process it again.我在SQS中有重试策略,所以当错误发生时,消息返回到SQS,Lambda再次处理。 When it processes it again, the same message, it succeeds and is processed successfully.
当它再次处理它时,同样的消息,它成功并处理成功。
Any idea why?知道为什么吗?
It's normal for the message to be processed successfully on the second attempt if the root cause of the "InvalidSignatureException: Signature expired" error was resolved in the meantime.如果同时解决了“InvalidSignatureException:Signature expired”错误的根本原因,第二次尝试成功处理消息是正常的。
Here are some possible reasons why the error occurred on the first attempt but not on the second:以下是错误在第一次尝试时发生但在第二次尝试时不发生的一些可能原因:
correctClockSkew
option when constructing a service client.correctClockSkew
选项解决了这个问题。 Reference Links:参考链接:
The request was made using a temporary security token that had expired, and this issue was resolved in the meantime.该请求是使用已过期的临时安全令牌发出的,同时此问题已得到解决。
There was a transient issue with the AWS infrastructure that caused the error on the first attempt, but the issue was resolved on the second attempt. AWS 基础设施存在暂时性问题,导致第一次尝试出现错误,但第二次尝试时问题得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.