Usage¶
Usage with AWS Cloud Formation¶
First you need to create a lambda that perform the processing Together with the library there is some example you can check:
See the example in example_lambda to check how to create your lambda code.
Create a package that contains the lambda code you prepared together with the required third party libraries:
$ python -m cfmacro.utils.package_lambda -r requirements.txt -f lambda.py -o lambda_package.zip
Upload the package on S3
Check the example_cloudformation template how to register the lambda and be able to use the Cloudformation Macro Transform later
Usage of processors¶
Once you have the macro available in your platform you can extend your Cloud Formation templates by using the resources available via the processor plugins you enabled in the lambda code.
Check the example_template that uses the SgProcessor to create Security Group Rules based on a list of directives.