silvermine / serverless-plugin-cloudfront-lambda-edge

Adds Lambda@Edge support to Serverless
MIT License
296 stars 41 forks source link

Request: Option to set log expiration #45

Open elgordino opened 4 years ago

elgordino commented 4 years ago

Currently the CloudWatch logs are created with 'Never Expire'. Is there an option to set an expiration time?

I have logRetentionDays: 30 set in my provider for the regular lambda functions. Can this be picked up by this plugin? Or alternatively a new option be provided?

Thanks!

jthomerson commented 4 years ago

Great idea @elgordino. We're open to pull requests. If you read and apply our information on contributing, coding standards, and commit message standards, your review process will go much easier and faster.

https://github.com/silvermine/silvermine-info

elgordino commented 1 year ago

For anyone coming across this issue there is some more discussion here: https://github.com/serverless/serverless/issues/7574

And they are having a similar issue with CDK: https://github.com/aws/aws-cdk/issues/12690

Fundamentally the issue is that the Logs are not created in a region until someone makes a request in that region and AWS do not provide a way to set the log expiration date when this happens.