You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating BucketProps from core Defaults3Props, then modifying to suit: disable versioning. Causes an error: Cannot use 'noncurrent' rules on a nonversioned bucket. It appears that a default lifecycle policy was added in 1.64.0. For customers that may have used the example code below prior to 1.64.0, this will cause their stack to fail.
Reproduction Steps
let bucketprops = DefaultS3Props();
ArtifactBucketCfg = overrideProps(ArtifactBucketCfg, {
serverAccessLogsPrefix: 'access-logs',
versioned: false
})
const bktArtifact = new s3.Bucket(this, "ArtifactBucket");
Error Log
Cannot use 'noncurrent' rules on a nonversioned bucket
Environment
CDK CLI Version : 1.64.0
CDK Framework Version: 1.64.0
AWS Solutions Constructs Version : 1.64.0
OS : OS/X
Language : Typescript
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered:
mobri2a@ Good find! The fix has been pushed out in the latest release v1.64.1, for proof see this test case with versioning disabled which does not have the default life cycle policy and this test case with default versioning enabled which has the default life cycle policy.
For future reference, we do not recommend using the default props directly from the core package in the application code unless absolutely necessary. In which case, be aware to use the build function, if available. For instance, in this case, use buildS3Bucket function instead of DefaultS3Props
Creating BucketProps from core Defaults3Props, then modifying to suit: disable versioning. Causes an error: Cannot use 'noncurrent' rules on a nonversioned bucket. It appears that a default lifecycle policy was added in 1.64.0. For customers that may have used the example code below prior to 1.64.0, this will cause their stack to fail.
Reproduction Steps
Error Log
Cannot use 'noncurrent' rules on a nonversioned bucket
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: