Skip to content

Logical Id for LayerVersion not updated #703

@dqvist

Description

@dqvist

Description:

When creating a AWS::Serverless::LayerVersion and using a combination of S3 Location Object and !Ref for the ContentUri the generated hash for the logical Id don't change.

Template in use:

HelloWorldLayer:
Type: "AWS::Serverless::LayerVersion"
Properties:
LayerName: hello-world
Description: Simple Hello World Layer
ContentUri:
Bucket: !Ref ArtifactBucket
Key: !Ref ArtifactKey
CompatibleRuntimes:
- python2.7
- python3.6
- python3.7
LicenseInfo: 'Available under the MIT-0 license.'
RetentionPolicy: Retain

Steps to reproduce the issue:

  1. Deploy a LayerVersion using the template snippet above.
  2. Update value for template parameter ArtifactKey
  3. Redeploy the LayerVersion

Observed result:

Same logical Id generated and the old LayerVersion gets deleted.

Expected result:

A new logical Id is generated and old LayerVersion is preserved.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions