Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def evaluate_compliance(configuration_item, rule_parameters):
- ################################
- # EDIT BELOW THIS COMMENT ONLY #
- ################################
- ami_whitelist = rule_parameters["AllowedAMIs"]
- if (configuration_item['resourceType'] != 'AWS::EC2::Instance'):
- return 'NOT_APPLICABLE'
- elif (configuration_item['configuration']['imageId'] in ami_whitelist):
- return 'COMPLIANT'
- else:
- return 'NON_COMPLIANT'
- ################################
- # EDIT ABOVE THIS COMMENT ONLY #
- ################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement