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

Warning on task deploy: "aws-cdk-lib.aws_lambda.FunctionOptions#logRetention is deprecated." #293

Closed
vboufleur opened this issue Jan 30, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vboufleur
Copy link
Contributor

Describe the bug
While deploying the stack the following warning appears:

[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.

How to reproduce it
Just deploy a stack.

Expected behaviour
No warnings, as they indicate that in the next major CDK release the deployment will break.

Please fill in the following information about the solution:.

  • Version: 4.2.1
  • Region: us-east-1
  • Has the solution been modified from the version posted to this repository? Yes
  • If yes, are the changes available on GitHub? No

Screenshots.
image

@vboufleur vboufleur added the bug Something isn't working label Jan 30, 2024
@daknhh daknhh self-assigned this Jan 30, 2024
@daknhh
Copy link
Contributor

daknhh commented Jan 30, 2024

Thanks for adding the bug, i will fix this in the next version

@daknhh
Copy link
Contributor

daknhh commented Feb 23, 2024

fixed in 4.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Released
Development

No branches or pull requests

2 participants