Git Product home page Git Product logo

aws-limit-monitor's Introduction

AWS Limit Monitor Solution

The AWS Limit Monitor Solution is a reference implementation that provides a foundation for monitoring AWS service limits. Customers can leverage the solution to monitor limits across services supported by Amazon Trusted Advisor; in multiple regions and multiple AWS accounts. The solution integrates with Amazon SNS and Slack to notify customers for service limits approaching thresholds.

Getting Started

To get started with the AWS Limit Monitor Solution, please review the solution documentation. Documentation

Running unit tests for customization

  • Clone the repository, then make the desired code changes
  • Next, run unit tests to make sure added customization passes the tests
cd ./deployment
chmod +x ./run-unit-tests.sh  
./run-unit-tests.sh 

Building distributable for customization

  • Configure the bucket name of your target Amazon S3 distribution bucket
export TEMPLATE_OUTPUT_BUCKET=my-bucket-name # bucket where cfn template will reside
export DIST_OUTPUT_BUCKET=my-bucket-name # bucket where customized code will reside
export SOLUTION_NAME=aws-limit-monitor # Solution name
export SOLUTION_VERSION=v5.3.3 # Solution version

Note: You would have to create 2 buckets, one with prefix 'my-bucket-name' and another regional bucket with prefix 'my-bucket-name-<aws_region>'; aws_region is where you are testing the customized solution. Also, the assets in bucket should be publicly accessible

  • Now build the distributable:
chmod +x ./build-s3-dist.sh 
./build-s3-dist.sh $DIST_OUTPUT_BUCKET $SOLUTION_NAME $SOLUTION_VERSION $TEMPLATE_OUTPUT_BUCKET 
  • Deploy the distributable to an Amazon S3 bucket in your account. Note: you must have the AWS Command Line Interface installed.
aws s3 cp ../source/lambda/services/limitreport/dist/ s3://my-bucket-name/limit-monitor/latest/ --recursive --exclude "*" --include "*.template" --acl bucket-owner-full-control --profile aws-cred-profile-name 
aws s3 cp ../source/lambda/services/limitreport/dist/ s3://my-bucket-name-<aws_region>/limit-monitor/latest/ --recursive --exclude "*" --include "*.zip" --acl bucket-owner-full-control --profile aws-cred-profile-name 
  • Get the link of the limit-monitor.template uploaded to your Amazon S3 bucket.
  • Deploy the AWS Limit Monitor Solution to your account by launching a new AWS CloudFormation stack using the link of the limit-monitor.template.

File Structure

The AWS Limit Monitor Solution project consists of 4 microservices which is deployed to a serverless environment in AWS Lambda.

|-source/
  |-bin
  |-lambda
    |-services/
      |-customhelper/ [ microservice for handling cloudformation custom resources ]
        |-lib/
          |-[ service module unit tests ]
          |-index.js [main module]
          |-logger.js [logger module]
          |-metrics-helper.js [ helper module for sending anonymous metrics ]
        |-index.js [ injection point for microservice ]
        |-package.json
      |-limitreport/ [ microservice for summarizing service limits ]
        |-lib/
          |-[ service module unit tests ]
          |-index.js [main module]
          |-limit-report.js [message handling module]
          |-logger.js [logger module]
          |-metrics-helper.js [ helper module for sending anonymous metrics ]
        |-index.js [ injection point for microservice ]
        |-package.json
      |-slacknotify/ [ microservice for sending slack notifications ]
        |-lib/
          |-[ service module unit tests ]
          |-index.js [main module]
          |-logger.js [logger module]
          |-slack-notify.js [slack messaging module]  
        |-index.js [ injection point for microservice ]
        |-package.json
      |-tarefresh/ [ microservice for refreshing TA checks ]
        |-lib/
          |-[ service module unit tests ]
          |-index.js [main module]
          |-logger.js [logger module]
          |-ta-refresh.js [TA checks module]  
        |-index.js [ injection point for microservice ]
        |-package.json   
  |-test
  |-lib
  |-cdk.json
  |-jest.config.js
  |-package.json
  |-README.md
  |-tsconfig.json

Collection of operational metrics

This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the implementation guide.

License

See license here

aws-limit-monitor's People

Contributors

brandonmorgado avatar georgebearden avatar hyandell avatar iscofield avatar martinb3 avatar shsenior avatar trobiv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.