-
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): generic service managed log group to replace log retention #26947
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
9b1634f
to
158b290
Compare
158b290
to
9350375
Compare
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Hi @mrgrain, The change in here seems like a great follow up to actually ease the pain of such migration - as we've accumulated data in the lambda's log group that we wouldn't want to just drop, and this seems like a good option to continue using the same name we currently have. Is the plan for this change to still happen? |
Hey @humanzz thanks for reaching out. I'm not sure how this PR would ease any migration pain. Could you elaborate on this? To me it feels like this PR would almost contribute to the opposite and reduce pressure to migrate. Also, you should not lose any log data from the old log groups. But new data would go into the new log group. Depending on how long you typically go back in your logs and your data retention setting, this might be a quite limited transition period. For example if you have a 14days log retention policy, after 14 days you will only have a single log group again. On a related note if you are storing logs for a really long time, you might want to consider moving long term storage away from CloudWatch Logs, as there are cheaper options available. |
So, here's some context and thoughts
|
Hey @mrgrain, just wondering if u got a chance to checkout my earlier comment and if u have any thoughts abt it? |
Likely unrelated'ish to this PR, but wanted to just say that LoggingConfig for Lambda isn't available in GovCloud yet. Please don't rush to change all the lambdas that CDK core defines to use the new LoggingConfig because it'll break in GovCloud. Maybe other partitions as well. EDIT: I tried this last Friday to fix the CDK deprecations and this is the error I got:
|
That's very understandable. But this also implies you will never be able to migrate due to this inconvenience. (Which is fine, it should 100% be your choice.)
If completed that would have worked. Maybe. There would have still be a circular dependency.
We will definitely keep considering this given that other services don't have the flexibility lambda offers. Please open a new issue for the specific services you are interested in so we can prioritize this appropriately. Re MigrationSince all your well-named log groups already exists, you could important them into your stack using the existing name. Fundamentally the issue with this comes down to
The Lambda team decided to go with the first option. While I personally agree with this choice anyway, it also very much means that the CDK will have to go with this choice. You are rightfully asking us to maintain the second option as a mitigation to complex migration. That's a fair ask, but I can't tell you what the likelihood is that we will do this. In general we are reluctant to create duplication with native CFN features. However none of that answers your very valid concerns about migration. So we'll have to think more about this. |
Well 💩 That's one is on me. Can you please open a new issue @polothy |
@polothy I'm trying to get confirmation if LoggingConfig is supposed to be available in GovtCloud or not. If you can and don't mind, I'd also recommend you put a support ticket in. I have so far found the announcement that states "all commercial regions" and a blog post that states "all regions". 😐 |
KmsKeyId: this.props.encryptionKey?.keyArn, | ||
RetentionInDays: this.props.retention, | ||
Tags: this.tags.renderedTags, | ||
Tagging: options.tagging, |
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.
Is it possible to get tags from the CloudFormation stack? We stopped using tags in our templates and moved to tagging stacks due to some resources not allowing tag updates and/or differences with GovCloud.
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.
That's one reason why this PR isn't finished. 😓
I'm working with our AWS TAM to check into it and add our +1 to it going to GovCloud. |
I've got confirmation that LoggingConfig is not available in GovCloud yet. Your TAM will be your best path to get a date. |
Reverting the deprecation: #28934 |
A general purpose implementation for a LogGroup that is usually managed by a service directly.
Supports all features a LogGroup supports.
It looks like a LogGroup, swims like a LogGroup and quacks like a LogGroup.
Replaces #26049 to close #17533
Replaces #21820 to close #21804
Currently missing features, might end up dropping them intentionally
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license