awslabs / aws-config-rules

[Node, Python, Java] Repository of sample Custom Rules for AWS Config.
http://aws.amazon.com/config/
Creative Commons Zero v1.0 Universal
1.6k stars 854 forks source link

Can't install some Python AWS config rules #306

Closed HalinGG closed 4 years ago

HalinGG commented 4 years ago

Hi, some rules don't have a parameters.json and therefore can't be deployed with the RDK.

One example:

https://github.com/awslabs/aws-config-rules/blob/master/python/cloudtrail_encrypted.py

How can I install the python AWS config rules that are just a python file like this?

I'm trying to install all the rules here: https://github.com/awslabs/aws-config-rules/blob/master/python

Thank you,

Halin

jongogogo commented 4 years ago

Hi Halin, some of the rules are legacy and have not been develop via the RDK. In addition, we got contributor who asked to access to code as example, instead of just the parameters.json for managed rules (I just did a revert).

To answer your question, you'd require to put the code in a new directory, and add a parameters.json. The RDK would be able to deploy it. BUT in this case, I'd suggest you deploy the managed rule: https://docs.aws.amazon.com/config/latest/developerguide/cloud-trail-encryption-enabled.html

You can see an example of a parameters.json for managed rule here: https://github.com/awslabs/aws-config-rules/blob/master/python/ACM_CERTIFICATE_EXPIRATION_CHECK/parameters.json

HalinGG commented 4 years ago

@jongogogo thank you!! That explains it.