After migrating a CloudFormation template to AWS SAM approach, when deploying template created with aws cloudformation package
, in CloudFormation I get error
Encountered unsupported property CodeUri
on all Lambda functions that are included in the template.
After investigation, it's clear that CodeUri property is not removed from the packaged template and AWS::Lambda::Function type doesn't support CodeUri property, although proper resources are uploaded to S3 as part of the package process (so package as such works).
The reason for AWS SAM not removing CodeUri is incorrect resource type - it should be AWS::Serverless::Function
and not AWS::Lambda::Function
.
After this change, CodeUri is removed from the packaged template.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With