Describe your idea/feature/enhancement
I wish the SAM Translator would generate also the CloudWatch LogGroup for a declared Lambda.
In this way the deployment will be consistent during deletion and delete also the log group.
Proposal
Additional property for AWS::Serverless::Function which generate the AWS::Logs::LogGroup associated.
Now:
MyService:
Type: AWS::Serverless::Function
Properties:
...
MyLogs:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub /aws/lambda/${MyService}
Proposal:
MyService:
Type: AWS::Serverless::Function
Properties:
LogGroup: enabled
or
MyService:
Type: AWS::Serverless::Function
Properties:
LogGroup:
RetentionInDays: 7
DeletionPolicy: Retain/Delete
Things to consider:
[ ] The SAM documentation will need to be updated
[ ] Compatibility with previous version, if the new property is not explicitly provided, the log group should not be generated
Additional Details
Describe your idea/feature/enhancement
I wish the SAM Translator would generate also the CloudWatch LogGroup for a declared Lambda.
In this way the deployment will be consistent during deletion and delete also the log group.
Proposal
Additional property for AWS::Serverless::Function which generate the AWS::Logs::LogGroup associated.
Now:
Proposal:
or
Things to consider:
[ ] The SAM documentation will need to be updated
[ ] Compatibility with previous version, if the new property is not explicitly provided, the log group should not be generated
Additional Details