===== 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: 1. See the example in example_lambda_ to check how to create your lambda code. 2. 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 3. Upload the package on S3 4. 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. .. _example_lambda: https://github.com/gchiesa/cfmacro/blob/master/cfmacro/_resources/examples/lambda.py .. _example_cloudformation: https://github.com/gchiesa/cfmacro/blob/master/cfmacro/_resources/examples/macro.template .. _example_template: https://github.com/gchiesa/cfmacro/blob/master/cfmacro/_resources/examples/cf_snippet_sg.template