AWS::Serverless transform creating resources that fail W3011 (DeletionPolicy/UpdateReplacePolicy rule)
See original GitHub issuecfn-lint version: (cfn-lint --version
)
0.26.01
Description of issue. The latest version of cfn-lint creates a warning in case of missing Deletion and UpdateReplace policy. This complain appears even though both properties are set for an S3 bucket which is the only resource in our stack wich requires these properties according to https://github.com/aws-cloudformation/cfn-python-lint/pull/1232. This warning did not appear prior to version 0.26.1. What is the difference beween I3011 and W3011?
Resources:
xxxBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Delete
UpdateReplacePolicy: Delete
Properties:...
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:12 (6 by maintainers)
Top Results From Across the Web
AWS::Serverless transform creating resources that fail W3011 ...
AWS::Serverless transform creating resources that fail W3011 (DeletionPolicy/UpdateReplacePolicy rule) #1265.
Read more >UpdateReplacePolicy attribute - AWS CloudFormation
Specify how to handle resource replacement during stack update operations in AWS CloudFormation by using the UpdateReplacePolicy attribute.
Read more >DeletionPolicy attribute - AWS CloudFormation
With the DeletionPolicy attribute you can preserve, and in some cases, backup a resource when its stack is deleted. You specify a DeletionPolicy...
Read more >AWS::Serverless transform - AWS CloudFormation
When creating a change set from the template, CloudFormation expands the AWS SAM syntax, as defined by the transform. The processed template expands...
Read more >AWS::Serverless::LayerVersion
Creates a Lambda LayerVersion that contains library or runtime code needed ... SAM adds a Resource attributes of DeletionPolicy: Retain to the transformed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PatMyron any news on this?
A workaround:
The error is because SAM creates resources of type
AWS::Lambda::Version
for each lambda function. This Version resource has a default property"DeletionPolicy": "Retain"
, but they don’t haveUpdateReplacePolicy
property. To see the full resources after transformation run cfn-lint with--info
.