[aws-ec2] Accidental Log Group creation when creating a VPC #33025
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the bug
When adding a VPC with:
const vpc = new ec2.Vpc(this, 'SomeVpc');
a Lambda function is created with the description:
Lambda function for removing all inbound/outbound rules from the VPC default security group
and immediately deleted after the deployment is finished.
The main problem this generates is that as a consequence of the Lambda, a Log Group is also created, with retention set to
never expire
.When the stack is deleted, the Log Group remains.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
A way to configure log retention.
Current Behavior
When the stack is deleted, the Log Group remains.
Reproduction Steps
const vpc = new ec2.Vpc(this, 'SomeVpc');
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.156.0 (build 2966832)
Framework Version
No response
Node.js Version
v22.9.0
OS
OSX
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: