Monitors number of active AWS Lambda containers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
IAM.policy
LICENSE
README.md
package.json

README.md

aws-lambda-container-monitoring

Monitors number of active AWS Lambda containers and reports to CloudWatch as a custom metric.

##Installation

  • Create IAM Role (see IAM.policy)
  • Install and package zip file with source code
    • npm install && npm run package
  • Create Lambda function
    • Runtime: nodejs4.3
    • Timeout: 300
    • Memory: 128
    • Handler: src/index.handler
    • Attach newly created IAM Role
    • Upload source package
    • Setup 1 minute scheduling

##Options In src/index.js:

var options = {
    cloudWatchMetricNamespace: 'Lambda/ContainerMonitoring', // CloudWatch metric namespace
    metricName: 'ActiveContainers', // CloudWatch metric name
    activeLambdaOffsetMillis: 10 * 60 * 1000 // Time in millis that a container is considered active
};

##How it works Read more about hos it works here: https://bynordenfelt.se/articles/2016/08/lambda-container-monitoring/