Giter VIP home page Giter VIP logo

aws-c7n-lambda-layer's Introduction

Synthesis Software Technologies' public Cloud Custodian (C7N) AWS Lambda Layer

Build Status

This repo outlines some of the details on Synthesis' public Cloud Custodian AWS Lambda Layer. For the latest layer version see the section: Latest C7N Layer Version below.

What is Cloud Custodian

Cloud Custodian is an open source real-time compliance and cost management product created by Capital One. See Capital One’s website for more detail.

About the Synthesis Software Technologies' public Cloud Custodian AWS Lambda Layer

To create this layer, we use a Travis CI Pipeline pointing to this GitHub repository which contains the configuration of the pipeline. The pipeline does the following:

  1. Specifies the version of python to use
  2. Creates a virtual environment with Custodian inside of it
  3. Deploys the virtual environment as a public Lambda layer

This pipeline will be run and updated as critical version changes are made to Custodian, creating a new layer version each time. Our latest layer version will be on this README in the section Latest C7N Layer Version. We have made this pipeline visible to you for you to see exactly what we are including in this layer giving you the comfort of knowing what will be in your environment.

Using the Synthesis Software Technologies' public Cloud Custodian AWS Lambda Layer

Running a Lambda function using our layer is quite a simple task. First, create your function – this should be a Python 2.7 runtime Lambda with a role you decide to give it.

Once you have your Lambda, you can click on the “Layers” button while previewing your lambda in the Lambda console.

Next, click on the “Add a layer” button and fill in the layer ARN you would like to use from the Latest C7N Layer Version table below

Once this has been done, your Lambda now has access to our Custodian source files, and you can easily write up your Lambda code to fetch your Custodian policies and run them as you wish. See the section Custodian Example

Latest C7N Layer Version

Date Published Layer Name Layer Version Lambda Arn Compatable runtime
10/01/2019 c7n-lambda-layer 8 arn:aws:lambda:eu-west-1:459295082152:layer:c7n-lambda-layer:8 Python 2.7.12

Custodian Example

Below is an example of how you can run the Custodian command through our AWS Lambda Layer:

import commands

def lambda_handler(event, context):
    print(commands.getstatusoutput("python /opt/custodian-layer/custodian schema ec2"))

aws-c7n-lambda-layer's People

Contributors

phzietsman avatar

Stargazers

 avatar  avatar  avatar

Watchers

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