Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging buckets should not get versioning by default. Versioned buckets should have a reasonable default lifecycle policy for old versions. #44

Closed
mobri2a opened this issue Aug 19, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mobri2a
Copy link

mobri2a commented Aug 19, 2020

DefaultS3Props (solution constructs core) sets versioning on for logging buckets, but does not set a lifecycle policy. Versioning on logging buckets isn't useful, as objects are written once. Versioning without a minimal lifecycle policy run the risk of increasing storage (and cost) without bounds.

Reproduction Steps

const loggingBucket = new Bucket(this, "S3LoggingBucket", loggingBucketConfig)

Produces (uninteresting bits omitted):

S3LoggingBucket:
    Type: AWS::S3::Bucket
    Properties:
      AccessControl: LogDeliveryWrite
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: AES256
      LoggingConfiguration:
        LogFilePrefix: access-logs
      PublicAccessBlockConfiguration:
        BlockPublicAcls: true
        BlockPublicPolicy: true
        IgnorePublicAcls: true
        RestrictPublicBuckets: true
      VersioningConfiguration:
        Status: Enabled

Error Log

No errors. But, versioning on logging buckets isn't useful, as objects are written once. Versioning without a minimal lifecycle policy run the risk of increasing storage (and cost) without bounds.

Environment

  • CDK CLI Version : 1.56.0
  • CDK Framework Version: 1.56.0
  • AWS Solutions Constructs Version : 1.56.0
  • OS : OS/X
  • Language : Typescript

Other


This is 🐛 Bug Report

@mobri2a mobri2a added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Aug 19, 2020
@hnishar
Copy link
Contributor

hnishar commented Aug 25, 2020

mobri2a@ Makes sense to remove the versioning for Logging bucket.

Default life cycle policy of the versioned buckets can be to transition the older versions to Glacier in 90 days. Life cycle policy can always be overridden by the user via the Construct Props. Feel free to share your thoughts as well.

@hnishar hnishar added enhancement New feature or request and removed bug Something isn't working labels Aug 25, 2020
@hnishar hnishar added in-progress This issue is being actively worked on and removed needs-triage The issue or PR still needs to be triaged labels Sep 10, 2020
@hnishar hnishar self-assigned this Sep 17, 2020
@hnishar
Copy link
Contributor

hnishar commented Sep 24, 2020

This has been fixed in v1.64.0

@hnishar hnishar closed this as completed Sep 24, 2020
@hnishar hnishar removed the in-progress This issue is being actively worked on label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants