Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AwsCustomResource support for log retention #6652

Closed
mcalello opened this issue Mar 10, 2020 · 4 comments · Fixed by #6677 or #6698
Closed

AwsCustomResource support for log retention #6652

mcalello opened this issue Mar 10, 2020 · 4 comments · Fixed by #6677 or #6698
Assignees
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.

Comments

@mcalello
Copy link

Currently, whenever an AwsCustomResource is deployed it creates its own Lambda function - with the LogRetention set to INFINITE. This feature requests is asking for that to be overridable by an additional Contruct prop within the AwsCustomResource or the AwsSdkCall.

Use Case

Without this feature, teams must manually find and delete logs created by these lambdas.

This is a 🚀 Feature Request

@mcalello mcalello added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 10, 2020
@SomayaB SomayaB added the @aws-cdk/custom-resources Related to AWS CDK Custom Resources label Mar 10, 2020
@eladb
Copy link
Contributor

eladb commented Mar 11, 2020

Copy: @jogold

@eladb eladb added the effort/small Small work item – less than a day of effort label Mar 11, 2020
jogold added a commit to jogold/aws-cdk that referenced this issue Mar 11, 2020
Add a `logRetention` prop to `AwsCustomResourceProps` to specify a custom log retention.

Closes aws#6652
@SomayaB SomayaB added in-progress This issue is being actively worked on. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 12, 2020
@mergify mergify bot closed this as completed in #6677 Mar 12, 2020
mergify bot pushed a commit that referenced this issue Mar 12, 2020
…ts-->

feat(custom-resources): log retention for AwsCustomResource (#6677)

<!--Use this to give a more detailed message that describes the change-->
Add a `logRetention` prop to `AwsCustomResourceProps` to specify a custom log retention.

<!--For every issue your PR resolves, add `fixes #<issue>` or `closes #<issue>`-->
Closes #6652
<!--Shout out to collaborators.-->

<!--If your PR includes breaking changes, uncomment and fill in the following (notice how multiple breaking changes should be formatted):-->
<!--
BREAKING CHANGE: Description of what broke and how to achieve this behavior now<br>
\* **module-name:** Another breaking change<br>
\* **module-name:** Yet another breaking change
-->

<!--IMPORTANT: This section cannot contain any additional markdown headers (#)-->
@mcalello
Copy link
Author

mcalello commented Mar 18, 2020

@eladb Thank you! 👍 Question - is there any task on the RoadMap for Function/SingletonFunction to use the LogRetention construct - that is comprised of both logRetentionDays and the related Role?

@jogold
Copy link
Contributor

jogold commented Mar 18, 2020

@mcalello do you mean using the custom resource with log retention and also a custom IAM role for this log retention (logRetentionRole prop)? Can you open a new feature request for that?

@mcalello
Copy link
Author

Thanks @jogold - I was about to do that, when I realized that there's a construct that would capture both of those mentioned above. But if Lambda isn't going to support that soon - yes, we would need to add the logRetentionRole prop to AwsCustomResource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.
Projects
None yet
4 participants