[英]how to configure asynconfig for lambda in cloudformation stack?
I created a cloud formation stack as below, I'm setting MaximumRetryAttempts: 1, but once the function is created the retry events is always set to 2 ( attached screenshot).我创建了一个云形成堆栈,如下所示,我设置了 MaximumRetryAttempts: 1,但是一旦创建了 function,重试事件总是设置为 2(附上的屏幕截图)。 how can i change the value of this.
我怎样才能改变这个的价值。
HelloWorldLambdaFunction:
Type: AWS::Lambda::Function
Properties:
FunctionName: hello-world
Runtime: python3.7
Handler: index.lambda_handler
version:
Type: AWS::Lambda::Version
Properties:
FunctionName: !Ref HelloWorldLambdaFunction
asynconfig:
Type: AWS::Lambda::EventInvokeConfig
Properties:
FunctionName: !Ref HelloWorldLambdaFunction
MaximumRetryAttempts: 1
Qualifier: !GetAtt version.Version
The code looks fine.代码看起来不错。 However, it seems to me that you are viewing
$LATEST
version in the console.但是,在我看来,您正在控制台中查看
$LATEST
版本。
However, you set the asynconfig
for version 1 .但是,您为版本 1设置了
asynconfig
。 Thus, in the console you have to explicitly select the correct lambda function version:因此,在控制台中,您必须明确 select正确的 lambda function 版本:
To use latest version:要使用最新版本:
asynconfig:
Type: AWS::Lambda::EventInvokeConfig
Properties:
FunctionName: !Ref HelloWorldLambdaFunction
MaximumRetryAttempts: 1
Qualifier: $LATEST
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.