Skip to content

plippe/aws-lambda-ip-availability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Lambda IP Availability

Subnets have a limited amount of available IP addresses. Once they have all been distributed, no other instance can be started in that subnet. This impacts resources that would automatically scale to meet demand.

To avoid being caught without any remaining IPs, an AWS CloudWatch alarm should be created, but that metric isn't available.

This repository contains a simple JavaScript function that publishes the total amount of IPs, and the remaining amount on AWS CloudWatch. The metrics are divided by region, by vpc, and by subnet.

Getting started

npm install
AWS_REGION=us-east-1 node src/index.js

AWS Lambda

This application works best as a function on AWS Lambda. All the scripts are available to create the stack, and publish the function.

# Install dependencies
npm install

# Create AWS CloudFormation stack (can take some time)
npm run create-cloudformation-stack

# Create a zip archive
npm run package

# Publish the code
npm run publish

...

# Delete AWS CloudFormation stack (when you are done)
npm run delete-cloudformation-stack

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published