Last active
March 19, 2021 12:38
-
-
Save rowanu/f014ee1ce5997ebcf3e6983391e30544 to your computer and use it in GitHub Desktop.
Clean up a Lambda function's logs when you delete it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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