Skip to content

v2.161.0

Compare
Choose a tag to compare
@aws-cdk-automation aws-cdk-automation released this 04 Oct 02:55
be5ad8b

Features

Bug Fixes


Alpha modules (2.161.0-alpha.0)

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

  • kinesisfirehose-destinations: the logging and logGroup properties in DestinationLoggingProps have been removed and replaced with a single optional property loggingConfig which accepts a class of type LoggingConfig.

Details

Combine the logging and logGroup properties into a single new optional property called loggingConfig which accepts a class of type LoggingConfig.

LoggingConfig is an abstract class which can be instantiated through either an instance of EnableLogging or DisableLogging which can be used in the following 3 ways:

import * as logs from 'aws-cdk-lib/aws-logs';

const logGroup = new logs.LogGroup(this, 'Log Group');
declare const bucket: s3.Bucket;

// 1. Enable logging with no parameters - a log group will be created for you
const destinationWithLogging = new destinations.S3Bucket(bucket, {
  loggingConfig: new destinations.EnableLogging(),
});

// 2. Enable a logging and pass in a logGroup to be used
const destinationWithLoggingAndMyLogGroup = new destinations.S3Bucket(bucket, {
  loggingConfig: new destinations.EnableLogging(logGroup),
});

// 3. Disable logging (does not accept any parameters so it is now impossible to provide a logGroup in this case)
const destinationWithoutLogging = new destinations.S3Bucket(bucket, {
  loggingConfig: new destinations.DisableLogging(),
});

Description of how you validated changes

unit + integ test

Checklist

Features

Bug Fixes

  • custom-resource-handlers: better fallback for require failures (#31571) (00cdbcb), closes #30067

Miscellaneous Chores

  • kinesisfirehose-destinations: refactor logging to combine logGroup and logging properties into loggingConfig (#31488) (c4bda64)