本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
EventInvokeConfiguration
非同步 Lambda 別名或版本調用的組態選項。
語法
若要在 AWS Serverless Application Model (AWS SAM) 範本中宣告此實體,請使用下列語法。
YAML
DestinationConfig:EventInvokeDestinationConfigurationMaximumEventAgeInSeconds:IntegerMaximumRetryAttempts:Integer
屬性
-
DestinationConfig -
組態物件,指定在 Lambda 處理過後事件的目標。
類型:EventInvokeDestinationConfiguration
必要:否
CloudFormation 相容性:此屬性類似於
AWS::Lambda::EventInvokeConfig資源的DestinationConfig屬性。SAM 需要額外的參數「類型」,此參數不存在於 CloudFormation 中。 -
MaximumEventAgeInSeconds -
Lambda 傳送至函數以進行處理的請求時間上限。
類型:整數
必要:否
CloudFormation 相容性:此屬性會直接傳遞至
AWS::Lambda::EventInvokeConfig資源的MaximumEventAgeInSeconds屬性。 -
MaximumRetryAttempts -
在函數傳回錯誤之前重試的次數上限。
類型:整數
必要:否
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