Ömer Toraman
10/11/2021, 6:03 PMSAM
app is this repository in SAR: https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:374852340823:applications~auto-set-log-group-retention
So I have two questions.
1. How can I see the current retention for a stack?
2. Can I change it without per stack without specifying every log group for a function one by one?Ross Coundon
10/11/2021, 6:11 PMimport * as logs from "@aws-cdk/aws-logs";
const log = new logs.LogGroup(this, 'myLogGroup', {
retention: logs.RetentionDays.FIVE_DAYS,
});
Ross Coundon
10/11/2021, 6:12 PMFrank
Ross Coundon
10/12/2021, 7:09 PMÖmer Toraman
10/12/2021, 7:30 PMFrank
Api
construct - https://github.com/serverless-stack/serverless-stack/issues/856Frank
logRetention
in ur function, ie.
{
logRetention: logs.RetentionDays.THREE_DAYS,
}