Giter Club home page Giter Club logo

aws-acm-cert-checker's Introduction

AWS Certificate Manager Cert Checker

aws-acm-cert-checker was created to allow more methods for alerting on expiring certificates managed by AWS Certificate Manager, and can be modified to alert at various different expiration intervals. This project may be very comparable to Amazon's own acm-certificate-expiration-check CloudFormation template. The key differences as described later in this ReadMe are the different customizable methods.

Some key features are:

  • Ability to send alert notifications to SNS, email, or SMS
  • Ability to send alerts to PagerDuty
  • Set your own logic on expiration intervals and frequencies
  • Additional integrations can be added, such as sending notifications to Slack

Summary of files

setup.cfg can be ignored. It is a workaround needed only if you have a Homebrew-installed Python on Mac, which allows pip modules to be installed into a specific target directory.

package-lambda-py.sh is used to install pip requirements for the lambda function. It also packages up the lambda function as a deployment.zip file to be uploaded to AWS Lambda.

lambda.py is the logic of the lambda function. The lambda function will:

  • Iterate through AWS ACM certificates in all regions (this can be fine-tuned by using an explicit list, if preferred)
  • Create a detailed json payload describing important details of the certifcate
  • Alert to either SNS or PagerDuty (defined by environment variable) when expiration is at 90 days, 60 days, 30 days, and then every day when there is 7 days left to expiration
  • This lambda function was designed to run once per day

Creating the Lambda function

After the package-lambda-py.sh has been run, you will then need to upload the deployment.zip to AWS Lambda as a Python 2.7 function. For details, please see how to upload the deployment.zip to AWS Lambda. If you are just starting out, using the AWS Console UI is perfectly fine. Click here for a tutorial on how to trigger Lambda on a schedule (much like cron).

Setting Lambda environment variables

Next, you will need to set environment variables for the lambda function.

  • ALERT_METHOD = SNS or PAGERDUTY
  • SNS_ARN = AWS_SNS_ARN_GOES_HERE (only set if SNS was selected)
  • INTEGRATION_KEY = PAGERDUTY_INTEGRATION_KEY_GOES_HERE (only set if PAGERDUTY was selected)

aws-acm-cert-checker's People

Contributors

kaynenotkanye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.