Skip to content

Commit

Permalink
Fix aws-s3 README
Browse files Browse the repository at this point in the history
  • Loading branch information
samson-keung committed May 25, 2024
1 parent 61a02d0 commit 0efae66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/aws-cdk-lib/aws-s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,12 @@ When `autoDeleteObjects` is enabled, `s3:PutBucketPolicy` is added to the bucket
Pass a custom log group via the `autoDeleteObjectsLogGroup` option, which will be used by the custom resource lambda.

```ts
import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs';

const bucket = new s3.Bucket(this, 'MyTempFileBucket', {
removalPolicy: cdk.RemovalPolicy.DESTROY,
autoDeleteObjects: true,
autoDeleteObjectsLogGroup: new logs.LogGroup(stack, 'LogGroup', {
autoDeleteObjectsLogGroup: new LogGroup(this, 'LogGroup', {
logGroupName: 'MyLogGroup',
retention: RetentionDays.TWO_YEARS
})
Expand Down

0 comments on commit 0efae66

Please sign in to comment.