-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(logs): specify log group's region for LogRetention #9804
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR 😊
I would like this one to wait until this PR is merged - #9808.
That's fine to wait for #9808. We were doing these changes(move and adding the region) in parallel so they resulted in two dependent PRs. I believe the changes from my side after #9808 should involve moving this code to the LogRetention in aws-logs and addressing any other comments that you might have. |
Global AWS services follow the convention of autocreating CloudWatch Logs in us-east-1, which makes it challenging to control the log group retention when the stack is created in other region. This change adds support for specifying the optional region for LogRetention
4c4da3a
to
479070f
Compare
Hey @nija-at, I think this is now ready for further review after rebasing on my changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. Just a couple of comments around documentation.
packages/@aws-cdk/aws-logs/README.md
Outdated
@@ -32,6 +32,13 @@ retention period (including infinite retention). | |||
|
|||
[retention example](test/example.retention.lit.ts) | |||
|
|||
**Note** When using `LogRetention` to configure retention period for the log group, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was missed in the previous PR - can we add a separate section in the README dedicated to the LogRetention
construct?
I suspect it will look something similar to - https://github.com/aws/aws-cdk/tree/master/packages/@aws-cdk/aws-lambda#singleton-function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a new entry
Pull request has been modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken the liberty to re-write some sections in the README.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Global AWS services follow the convention of auto-creating CloudWatch Logs in
us-east-1
, whichmakes it challenging to control the log group retention when the stack is created in other region.
This change adds support for specifying the optional region for LogRetention to be able to set log retention on CloudWatch logs created by global AWS Services in
us-east-1
Closes #9703
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license