EventInvokeConfiguration - Amazon Serverless Application Model
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

EventInvokeConfiguration

异步 Lambda 别名或版本调用的配置选项。

语法

要在您的 Amazon Serverless Application Model (Amazon SAM) 模板中声明此实体,请使用以下语法。

属性

DestinationConfig

一个配置对象,用于在 Lambda 处理事件后指定事件目标。

类型EventInvokeDestinationConfiguration

必需:否

Amazon CloudFormation 兼容性:此属性类似于 AWS::Lambda::EventInvokeConfig 资源的 DestinationConfig 属性。SAM 需要一个额外参数“类型”,该参数在 CloudFormation 中不存在。

MaximumEventAgeInSeconds

Lambda 发送到函数以进行处理的请求的最长期限。

类型:整数

必需:否

Amazon CloudFormation 兼容性:此属性直接传递给 AWS::Lambda::EventInvokeConfig 资源的 MaximumEventAgeInSeconds 属性。

MaximumRetryAttempts

在函数返回错误前重试的最大次数。

类型:整数

必需:否

Amazon CloudFormation 兼容性:此属性直接传递给 AWS::Lambda::EventInvokeConfig 资源的 MaximumRetryAttempts 属性。

示例

MaximumEventAgeInSeconds

MaximumEventAgeInSeconds 示例

YAML

EventInvokeConfig: MaximumEventAgeInSeconds: 60 MaximumRetryAttempts: 2 DestinationConfig: OnSuccess: Type: SQS Destination: arn:aws:sqs:us-west-2:012345678901:my-queue OnFailure: Type: Lambda Destination: !GetAtt DestinationLambda.Arn