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

[CDK] Lambda.logRetention is deprecated #9

Open
coderbyheart opened this issue Jan 29, 2024 · 0 comments
Open

[CDK] Lambda.logRetention is deprecated #9

coderbyheart opened this issue Jan 29, 2024 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@coderbyheart
Copy link
Member

[WARNING] aws-cdk-lib.aws_lambda.FunctionOptions#logRetention is deprecated.
instead create a fully customizable log group with logs.LogGroup and use the logGroup property to instruct the Lambda function to send logs to it.
Migrating from logRetention to logGroup will cause the name of the log group to change.
Users and code and referencing the name verbatim will have to adjust.

In AWS CDK code, you can access the log group name directly from the LogGroup construct:

declare const myLogGroup: logs.LogGroup;
myLogGroup.logGroupName;

This API will be removed in the next major release.

@coderbyheart coderbyheart added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant