Last active
February 25, 2019 23:59
-
-
Save alexcasalboni/45839b537d564c09d53762d47f04158a to your computer and use it in GitHub Desktop.
AWS Config - AWS Lambda Custom Rule example (YAML)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: 'AWS::Serverless-2016-10-31' | |
Resources: | |
MyFunction: | |
Type: 'AWS::Serverless::Function' | |
Properties: | |
Handler: index.handler | |
# ... | |
# all the other properties here | |
# ... | |
MyCustomRule: | |
Type: AWS::Config::ConfigRule | |
Properties: | |
ConfigRuleName: MyCustomRule | |
Scope: | |
ComplianceResourceTypes: | |
- AWS::EC2::Instance # listen to all instances | |
InputParameters: | |
desiredInstanceType: t2.small | |
Source: | |
Owner: CUSTOM_LAMBDA | |
SourceIdentifier: !GetAtt MyFunction.Arn | |
SourceDetails: | |
- | |
EventSource: aws.config | |
MessageType: ConfigurationItemChangeNotification | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment