AWS Config RDKlib

Python library to enable you to run custom AWS Config Rules at scale, using Lambda Layer.

AWS Open Source Cloud Service Only
Category Compliance & Governance
Community Stars 95
Last Commit 1 month ago
Last page update 19 days ago
Pricing Details Free and open-source under the Apache License 2.0.
Target Audience Developers and DevOps teams managing AWS Config Rules.

The AWS Config RDKlib addresses the challenge of managing and scaling custom AWS Config Rules by simplifying the development, deployment, and maintenance of these rules. Here’s a breakdown of its technical architecture and operational considerations:

RDKlib is a Python library designed to work in conjunction with the AWS Config Rule Development Kit (RDK). It leverages AWS Lambda Layers to encapsulate the boilerplate code, allowing developers to focus solely on the compliance logic. The library provides a structured approach to creating custom Config Rules, whether triggered periodically or by configuration changes. It utilizes the ClientFactory class to manage AWS service interactions and handles event processing through the Evaluator class, which distinguishes between scheduled notifications and configuration item changes.

Deploying RDKlib involves installing the library locally and creating rules using the RDK. Rules can be triggered either periodically or by changes to specific AWS resources, such as S3 buckets. The library is deployed as an AWS Lambda Layer, which simplifies the inclusion of the library in your deployment package without adding unnecessary code. This approach also eases maintenance, as updates to the library can be managed independently of the rule code.

Key Technical Details include:
- Event Handling: The Evaluator class processes events, checking for valid rule parameters and handling compliance evaluations based on the event type (scheduled or configuration change).
- Resource Types: Rules must specify expected resource types for change-triggered rules to ensure proper evaluation.
- Role Management: The library manages execution roles and assume role regions based on rule parameters, ensuring correct role assumptions during evaluations.
- Error Handling: It includes robust error handling mechanisms, such as InvalidParametersError and MissingTriggerHandlerError, to ensure that rule evaluations are handled correctly.

While RDKlib streamlines the development of custom Config Rules, it requires careful configuration of rule parameters and execution roles. Additionally, the use of Lambda Layers may introduce dependencies that need to be managed, and the library's performance could be affected by the complexity and volume of the rules being evaluated. However, these trade-offs are generally manageable given the benefits of centralized compliance management and scalability.

Improve this page