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

awscdklambdagoalpha: LogRetention doesn't work #28711

Closed
eloymg opened this issue Jan 15, 2024 · 4 comments
Closed

awscdklambdagoalpha: LogRetention doesn't work #28711

eloymg opened this issue Jan 15, 2024 · 4 comments
Labels
@aws-cdk/aws-lambda-go bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@eloymg
Copy link

eloymg commented Jan 15, 2024

Describe the bug

LogRetention doesn't work

Expected Behavior

Modify Lambda Logs retention to 3 months

Current Behavior

The Lambda Logs retention remains in never

Reproduction Steps

I cretae the lambda using this code:
image
And in Cloudwatch logs see:
image
Don't see any errors in LogRetetion Lambda.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.117.0 (build 59d9b23)

Framework Version

No response

Node.js Version

v18.19.0

OS

macOS Sonoma 14.2.1 (23C71)

Language

Go

Language Version

go1.21.3 darwin/arm64

Other information

No response

@eloymg eloymg added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 15, 2024
@sakurai-ryo
Copy link
Contributor

Hi @eloymg
Thanks for reaching out!
Could you try to use awslogs.RetentionDays_THREE_MONTHS instead of awslogs.RetentionDays("90")?
https://pkg.go.dev/github.com/aws/aws-cdk-go/awscdk/awslogs#RetentionDays

@eloymg
Copy link
Author

eloymg commented Jan 16, 2024

Hi @sakurai-ryo , works. Sorry i doesn't see properly that the type needed are a Enum. My confusion comes from the code itself works but no in the proper way. The name of the type I think is a bit confusing.

@pahud pahud closed this as completed Jan 16, 2024
@pahud pahud added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 16, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@sakurai-ryo
Copy link
Contributor

@eloymg
Sorry for the confusion and thanks for the feedback.
Many examples are listed in godoc and elsewhere, so if you have any problems, I would be grateful if you could look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-go bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

3 participants