Abstracts the more mundane aspects of lambda resources
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
src
.checkignore
.codecov.yml
.envrc
.gitignore
.travis.yml
CHANGELOG.rst
LICENSE
README.rst
build.py
readthedocs.yml
requirements.txt
setup.cfg
setup.py

README.rst

awslambdahelper 1.1.14

Code issues https://codecov.io/github/drewsonne/awslambdahelper/coverage.svg?branch=master https://travis-ci.org/drewsonne/awslambdahelper.svg?branch=master https://scrutinizer-ci.com/g/drewsonne/awslambdahelper/badges/quality-score.png?b=master

Abstracts the more mundane aspects of lambda resources

A lot of boilerplate code is required to implemented lambda's for AWS Config and custom Cloudformation resources. We can abstract this away and wrap our rule in data structures to improve development and encourage a particular structure.

Installation

$ pip install awslambdahelper

QuickStart

Create a Python class

# my_lambda_code.py
from awslambdahelper import AWSConfigRule

class MyConfigRule(AWSConfigRule):
    def find_violation_config_change(self, config, rule_parameters):
      return [NonCompliantEvaluation(
        Annotation="This failed because it is only a demo."
      )]
lambda_handler = MyConfigRule.handler

Setup AWS Lambda handler

>>> import boto3
>>> boto3.client('lambda').create_function(
  Handler = "my_lambda_code.lambda_handler'
)

Create AWS Config Rule

Getting Started with Custom Rules.

That's it! For a more indepth guide, read the docs.