Log retention not properly set for Lambda@Edge functions
#7574 aperta il 13 apr 2020
Metriche repository
- Star
- (46.915 stelle)
- Metriche merge PR
- (Merge medio 1g 15h) (34 PR mergiate in 30 g)
Descrizione
Bug Report
Description
- What did you do?
I created a Lambda@Edge deployment and set the log retention to 30 days.
- What happened?
The standard log group for the function /aws/lambda/my-function in us-east-1 has its retention policy properly set, this log group is not actually used as Lambda@Edge logs to groups in the region where the lambda is actually called/executed.
- What should've happened?
The log groups in each region named /aws/lambda/us-east-1.my-function should also have the retention set.
- What's the content of your
serverless.ymlfile?
Relevant parts are:
service: my-service
provider:
name: aws
runtime: nodejs10.x
stage: ${opt:stage, 'dev'}
region: us-east-1
logRetentionInDays: 30
functions:
my-function:
handler: index.handler
plugins:
- '@silvermine/serverless-plugin-cloudfront-lambda-edge'
- What's the output you get when you use the
SLS_DEBUG=*environment variable (e.g.SLS_DEBUG=* serverless deploy)
N/A
Similar or dependent issues:
https://forum.serverless.com/t/lambda-edge-log-retention-and-serverless-dashboard-monitoring/9913
It looks like this is possible through CloudFormation: