aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

[AWS::Lambda::Version] - [Enhancement] - Auto publish Lambda Versions #2068

Open flostadler opened 3 weeks ago

flostadler commented 3 weeks ago

Name of the resource

AWS::Lambda::Version

Resource name

No response

Description

The Lambda Version resource does not support publishing new versions (e.g. when the lambda code changes) directly. Instead, users need to add a new Lambda Version resource with a changed name.

This means that there's no native way how a user could update Lambda Functions and publish the new version without requiring some sort of template pre-processing (e.g. appending the code-hash to the resource name of the Lambda Version) or using a CustomResource.

Enhancing the AWS::Lambda::Version resource with the ability to auto-publish new versions would simplify the management of Lambdas. While CloudFormation has workarounds, those do not work for CloudControl.

Other Details

SAM added an auto-publish alias feature to support updating the lambda code and publishing a new version. This functionality would be useful CloudControl/CloudFormation.