Skip to content

fix(multiple): existing log buckets in props are ignored #1036

Closed
@biffgaut

Description

@biffgaut

When you provide an existing log bucket in a BucketProps object, for example in aws-eventbridge-kinesisfirehose-s3, that bucket should be used in the stack as the log bucket for the bucket created by the stack. Instead, the prop value is ignored and the construct still creates a new bucket.

Reproduction Steps

// logBucket is an s3.Bucket resource created somewhere in the stack

new EventbridgeToKinesisFirehoseToS3(stack, 'evtfhss3-existing-log-bucket', {
  eventRuleProps: {
    schedule: events.Schedule.rate(Duration.minutes(5))
  },
  bucketProps: {
    removalPolicy: RemovalPolicy.DESTROY,
    serverAccessLogsBucket: logBucket,    // <- key attribute
  },
  logGroupProps: {
    removalPolicy: RemovalPolicy.DESTROY
  },
});

The resulting template should have 2 buckets - the existing log bucket and the new firehose destination bucket, with logging set up appropriately. Instead, there are three buckets: a log bucket created by the construct, the new firehose destination bucket that is configured to log to the construct created log bucket, and the existing bucket (logBucket) that is not referenced by the pattern in the construct.

Error Log

Environment

  • CDK CLI Version :
  • CDK Framework Version:
  • AWS Solutions Constructs Version :
  • OS :
  • Language :

Other


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageThe issue or PR still needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions