Skip to main content

No project description provided

Project description

Code issues https://codecov.io/github/drewsonne/awslambdahelper/coverage.svg?branch=master https://travis-ci.org/drewsonne/awslambdahelper.svg?branch=master https://img.shields.io/pypi/v/awslambdahelper.svg

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."
      )]

Setup AWS Lambda handler

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

Create AWS Config Rule

Getting Started with Custom Rules.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awslambdahelper-1.1.7.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

awslambdahelper-1.1.7-py2-none-any.whl (10.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page