Closed
Description
Description
Using an EventInvokeConfig results in a processed template that ignores these fields completely
Steps to reproduce
Deploy something like the following template:
Resources:
ErrorReporterFunction:
Properties:
AutoPublishAlias: 'Live'
CodeUri: 'bootstrap-file'
FunctionName:
'Fn::Sub': "${AWS::StackName}-error-reporter-function"
Handler: 'UNUSED'
LoggingConfig:
ApplicationLogLevel: 'DEBUG'
LogFormat: 'JSON'
SystemLogLevel:
Fn::FindInMap:
- LambdaLogLevel
- Ref: 'LogSeverity'
- System
MemorySize: 512
Policies:
- 'AWSLambdaBasicExecutionRole'
Runtime: 'provided.al2'
Timeout: 300
Type: 'AWS::Serverless::Function'
MyFunction:
EventInvokeConfig:
DestinationConfig:
OnFailure:
Destination': !GetAtt ErrorReporterFunction.Arn
Type: 'Lambda'
Properties:
AutoPublishAlias: 'Live'
CodeUri: 'other-bootstrap-file'
FunctionName:
'Fn::Sub': "${AWS::StackName}-my-lambda"
Handler: 'UNUSED'
LoggingConfig:
ApplicationLogLevel: 'DEBUG'
LogFormat: 'JSON'
SystemLogLevel:
Fn::FindInMap:
- LambdaLogLevel
- Ref: 'LogSeverity'
- System
MemorySize: 512
Policies:
- 'AWSLambdaBasicExecutionRole'
Runtime: 'provided.al2'
Timeout: 300
Type: 'AWS::Serverless::Function'
Observed result
The processed template after deployment looks something like the following for MyFunction:
"MyFunction": {
"Type": "AWS::Lambda::Function",
"DependsOn": [
"ValidationProducerFunctionLogGroup"
],
"Properties": {
"Code": {
"S3Bucket": "<bucket-name>",
"S3Key": "<bootstrap-hash>"
},
"FunctionName": {
"Fn::Sub": "${AWS::StackName}-my-lambda"
},
"Handler": "UNUSED",
"MemorySize": 512
}
No reference to the EventInvokeConfig exist anywhere in the processed template.
Deploying the following as a top level resource seems to work:
EventInvokeConfig:
Type: AWS::Lambda::EventInvokeConfig
Properties:
FunctionName: !Ref MyFunction
Qualifier: "Live"
DestinationConfig:
OnFailure:
Destination: !GetAtt ErrorReporterFunction.Arn
Expected result
The transform should include my declared EventInvokeConfig in the processed template
Additional environment details
- OS: MacOs 14.4.1
- If using the SAM CLI,
sam --version
: - AWS region: us-east-1