AWS Lambda function which checks the total capacity of all Lambda functions in a specific region and publishes the metric to CloudWatch. A CloudFormation template is included to bootstrap the process.
AWS Lambda Deployment Limits. The total size of all the deployment packages that can be uploaded per region is 75GB. If you are including libraries and utilizing versioning for you lambda functions, you might eventually reach this limit. Monitor the total usage size is a good idea.
This lambda function uses the ListFunctions
and ListVersionsByFunction
API iterating and summing up their CodeSize
, and posts the value (in Bytes) to CloudWatch.
A CloudFormation template is provided to help with the creation of necessary resources, in addition to configuring an alarm.
This lambda function should be run using Scheduled events
, but CloudFormation support is currently unavailable so we need to explicitly configure this.
MIT License (see LICENSE)