Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clean up a Lambda function's logs when you delete it
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
InlineCode: |
exports.handler = async () => {
console.log('im in ur logs, killing ur d00ds')
return
}
Handler: index.handler
Runtime: nodejs8.10
LogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub /aws/lambda/${MyFunction}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.