Skip to content

fix(s3-deployment): custom logGroup of BucketDeployment is prevented from deletion#37309

Closed
syukawa-gh wants to merge 2 commits intoaws:mainfrom
syukawa-gh:fix/s3-deployment-loggroup-dependency-clean
Closed

fix(s3-deployment): custom logGroup of BucketDeployment is prevented from deletion#37309
syukawa-gh wants to merge 2 commits intoaws:mainfrom
syukawa-gh:fix/s3-deployment-loggroup-dependency-clean

Conversation

@syukawa-gh
Copy link
Copy Markdown
Contributor

When a custom logGroup is passed to BucketDeployment, the log group could be deleted before the Lambda handler during stack deletion. If the Lambda runs after the log group is deleted, it recreates the log group, preventing proper cleanup.

This adds a dependency from the handler to the logGroup so that CloudFormation deletes the log group only after the Lambda handler is deleted.

Closes #35632

When a custom logGroup is passed to BucketDeployment, the log group
could be deleted before the Lambda handler during stack deletion.
If the Lambda runs after the log group is deleted, it recreates the
log group, preventing proper cleanup.

Add a dependency from the handler to the logGroup so that CloudFormation
deletes the log group only after the Lambda handler is deleted.

Closes aws#35632
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 labels Mar 23, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team March 23, 2026 03:14
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@aws-cdk-automation aws-cdk-automation dismissed their stale review March 23, 2026 08:03

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@syukawa-gh
Copy link
Copy Markdown
Contributor Author

Superseded by new PR - the original accidentally overwrote an existing integ test file.

@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-s3-deployment: custom logGroup of BucketDeployment is prevented from deletion

3 participants