Skip to content

(logs): delete associated log group when stack is deleted #11549

@duarten

Description

@duarten

When the log group of a Lambda function is created by the LogRetention custom resource, then those log groups linger after the stack has been deleted. It should be possible to configure the removal policy.

Use Case

Not having hundreds of dead log groups around, created for PR and test deployments.

Proposed Solution

This requires setting the deletionPolicy on the CfnResource, and implementing support for the "Delete" event type in the custom resource itself.

Other

N/A

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-logsRelated to Amazon CloudWatch Logseffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions