Skip to content

Instantly share code, notes, and snippets.

@cgoering
Created April 26, 2019 18:28
Show Gist options
  • Save cgoering/4de674e3e3ca8d6255ea708997cca3b0 to your computer and use it in GitHub Desktop.
Save cgoering/4de674e3e3ca8d6255ea708997cca3b0 to your computer and use it in GitHub Desktop.
AWS Lambda memory usage metric in CloudFormation
CustomMetric:
Type: AWS::Logs::MetricFilter
Properties:
LogGroupName: !Sub /aws/lambda/${AWS::StackName}
FilterPattern: '[str="REPORT", ..., str="Max", str="Memory", str="Used:", MaxMemoryUsed, str="MB"]'
MetricTransformations:
- MetricNamespace: Organization/Project/Service
MetricName: MaxMemoryUsed
MetricValue: $MaxMemoryUsed
@cgoering
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment