Rule Development Kit Library for AWS Config
Project description
RDKlib
RDKlib is a Python library to enable you to run custom AWS Config Rules at scale. The library can be used to:
- Help you to focus only on the compliance logic, while the library does the heavy lifting
- Ease maintenance by moving the boilerplate code as a AWS Lambda Layer
- Ease deployment by using AWS Serverless Application Repository
RDKLib works in synergy with the AWS Config Rule Development Kit.
Getting Started
Install the library locally
pip install rdklib
Create a rule using the RDK
The runtime of your RDK rule have to be set to python3.11-lib in the RDK to provide you the Rule template.
- For periodic trigger:
rdk create YOUR_RULE_NAME --runtime python3.11-lib --maximum-frequency TwentyFour_Hours
- For configuration change trigger (for example S3 Bucket):
rdk create YOUR_RULE_NAME --runtime python3.11-lib --resource-types AWS::S3::Bucket
Note: you need to install the RDK first.
Deploy your rule with RDKlib layer
RDKLib is designed to work as a AWS Lambda Layer. It allows you to use the library without needing to include it in your deployment package.
- Install RDKlib layer (with AWS CLI)
aws serverlessrepo create-cloud-formation-change-set --application-id arn:aws:serverlessrepo:ap-southeast-1:711761543063:applications/rdklib --stack-name RDKlib-Layer
# Copy/paste the full change-set ARN to customize the following command
aws cloudformation execute-change-set --change-set-name NAME_OF_THE_CHANGE_SET
aws cloudformation describe-stack-resources --stack-name serverlessrepo-RDKlib-Layer
# Copy the ARN of the Lambda layer in the "PhysicalResourceId" key (i.e. arn:aws:lambda:YOUR_REGION:YOUR_ACCOUNT:layer:rdklib-layer:1).
Note: You can do the same step manually going to https://console.aws.amazon.com/lambda/home#/create/function?tab=serverlessApps and find "rdklib"
- Deploy the rule
rdk deploy YOUR_RULE_NAME --rdklib-layer-arn YOUR_RDKLIB_LAYER_ARN
License
This project is licensed under the Apache-2.0 License.
Feedback / Questions
Feel free to email rdk-maintainers@amazon.com
Contacts
- Benjamin Morris - Maintainer, code, testing
- Carlo DePaolis - Maintainer, code, testing
Acknowledgements
- Mark Beacom - Maintainer, code, testing
- Michael Borchert - Design, code, testing, feedback
- Ricky Chau - Maintainer, code, testing
- Julio Delgado Jr. - Design, testing, feedback
- Chris Gutierrez - Design, feedback
- Joe Lee - Design, feedback
- Jonathan Rault - Maintainer, design, code, testing, feedback
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rdklib-0.3.6.tar.gz
.
File metadata
- Download URL: rdklib-0.3.6.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b5cc880eccb455c71e859e1016c5506849e41cd8ba48bba5c30679edd521f87 |
|
MD5 | 410887b5da94c2969470d207a7bf195d |
|
BLAKE2b-256 | 15e5e101b7cedcbce78d1482262c8cea2eac5ddf4927d894e0a5c12bcadd954c |
File details
Details for the file rdklib-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: rdklib-0.3.6-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64e259c5d2142d950fd62e17fb62116f047277eff357a52736df68006b9a5e36 |
|
MD5 | d64d2fee76feb1e5ee72b5b2a9d9fb69 |
|
BLAKE2b-256 | 0acce6eb9cba54463635362838e0315b1ec3c6e4bc2f36275ef85a9c54facc54 |