Skip to content

Commit

Permalink
Merge pull request awslabs#29 from aaronkhoo/master
Browse files Browse the repository at this point in the history
Merging updates for Rules.md and Readme.md
  • Loading branch information
chrgut committed May 17, 2016
2 parents 98e5ea5 + 766963e commit 118558b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ You can use the sample functions in this repository to create Config rules that
Add a rule to AWS Config by completing the following steps. For more detailed steps, see [Developing a Custom Rule for AWS Config](http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_nodejs.html) in the *AWS Config Developer Guide*.

1. Sign in to the AWS Management Console and open the AWS Lambda console at https://console.aws.amazon.com/lambda/. Verify that your region is set to one that supports AWS Config rules. For the list of supported regions, see [AWS Config Regions and Endpoints](http://docs.aws.amazon.com/general/latest/gr/rande.html#awsconfig_region) in the *Amazon Web Services General Reference*.
2. Use the AWS Lambda console to create a Lambda function.
For the Lambda function code, copy and paste the code from the sample that you want to use.
2. Use the AWS Lambda console to create a Lambda function.
Provide your code using the method required by the code entry type that you choose.
If you are adding a Python or Node.js function, you can copy and paste the code from the sample that you want to use. If you are adding a Java function, you must provide a JAR file that contains the Java classes. For instructions to build the JAR file, see [Creating an AWS Config Rule with Java](./java/HOWTO.md).
For the role that you assign to your function, choose the **AWS Config role** option to create a role that grants AWS Config permission to invoke the function.
3. After you create the function, take note of its ARN.
4. Open the AWS Config console at https://console.aws.amazon.com/config/. Verify that your region is set to the same region in which you created the AWS Lambda function for your custom rule.
For **Handler**, if you are adding a Python or Node.js function, keep the default value. If you are adding a Java function, specify the handler value for to the Java function that you want to use. For the handler values, see [AWS Config Rules (Java)](./java/RULES_JAVA.md).
3. After you create the function, take note of its ARN.
4. Open the AWS Config console at https://console.aws.amazon.com/config/.
Verify that your region is set to the same region in which you created the AWS Lambda function for your custom rule.
5. Use the AWS Config console to add a custom rule.
For **AWS Lambda function ARN**, specify the ARN of the function that you created.
For **Trigger type**, if you are using any of the *triggered samples* from this repository (file name ends with ```triggered```), choose **Configuration changes**. If you are using any of the *periodic* samples from this repository (file name ends with ```periodic```), choose **Periodic**.
For the rule parameters, specify any required parameters that are documented in the [list of AWS Config rules (RULES.md)](./RULES.md).
For **Trigger type**, if you are using any of the *triggered samples* from this repository, choose **Configuration changes**. If you are using any of the *periodic* samples from this repository, choose **Periodic**.
For the rule parameters, specify any required parameters.
For the trigger types and required parameters for each function, see [AWS Config Rules](./RULES.md) (for Python and Node.js functions) or [AWS Config Rules (Java)](./java/RULES_JAVA.md).

After you create the rule, it displays on the **Rules** page, and AWS Config invokes its Lambda function. A summary of the evaluation results appears after several minutes.
After you create the rule, it displays on the **Rules** page, and AWS Config invokes its Lambda function. A summary of the evaluation results appears after several minutes.
10 changes: 9 additions & 1 deletion RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,12 @@ Description: Checks that all EC2 instances that have match a tag format (via reg
Trigger Type: ```Change Triggered```
Scope of Changes: ```EC2:Instance```
Required Parameters: ```namePattern```, ```securityGroupName```
Example Value: ```^prod(us|eu|br)[lw]box[0-9]{3}$```, ```MyTestGroup```
Example Value: ```^prod(us|eu|br)[lw]box[0-9]{3}$```, ```MyTestGroup```

### 28. Ensure MFA Enabled on Root Account
Description: Checks that the Root Account has MFA Enabled

java/src/main/java/com/amazonaws/services/config/samplerules/RootAccountMFAEnabled.java

Trigger Type: ```Periodic```
Required Parameter: ```None```

0 comments on commit 118558b

Please sign in to comment.