How to create a new version of a Lambda function using CloudFormation?

后端 未结 11 673
清歌不尽
清歌不尽 2020-12-08 03:44

I\'m trying to create a new version of a Lambda function using CloudFormation.

I want to have multiple versions of the same Lambda function so that I can (a) point a

11条回答
  •  情书的邮戳
    2020-12-08 04:35

    Worked for me the following:

    "LambdaAlias": {
                "Type": "AWS::Lambda::Alias",
                "DeletionPolicy" : "Retain",
                "Properties": {
                    "FunctionName": {
                        "Ref": "LambdaFunction"
                    },
                    "FunctionVersion": {
                        "Fn::GetAtt": ["LambdaVersion","Version"]
                    },
                    "Name": "MyAlias"
                }
    

提交回复
热议问题