AWS Config: Custom Rules and Conformance Packs

AWS Config: Custom Rules and Conformance Packs
AWS Config: Custom Rules and Conformance Packs

CLOUD LABS

AWS Config: Custom Rules and Conformance Packs

In this Cloud Lab, we’ll learn to monitor resources and enforce compliance by using the custom rules and conformance packs of AWS Config.

13 Tasks

advanced

3hr

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

A solid understanding of AWS Config
The ability to create and use the Custom Lambda rules of AWS Config
The capability to design and implement the Custom Policy rules of AWS Config
Hands-on experience deploying conformance packs to monitor AWS resources

Technologies
Lambda logoLambda
Config
IAM logoIAM
EC2 logoEC2
Skills Covered
Using AWS Cloud Services
Cloud Lab Overview

AWS Config is a management service that you can use to monitor the configurations of your AWS resources. It allows you to set up some rules based on which selected resources are continuously monitored for compliance against your desired configuration standards. AWS Config also flags resources that violate the set rules as noncompliant. This allows you to take proper actions to ensure your infrastructure is secure and compliant.

In this Cloud Lab, you’ll learn how to use AWS Config to monitor resources and enforce compliance. You’ll start by creating a custom rule using a Lambda function to check that no more than one instance is created in a region. After deploying the rule, you’ll test it by creating two EC2 instances and then checking the compliance status of the custom rule. You’ll then add a remediation action, re-evaluate the rule, and check whether the noncompliant resource has been remediated or not. After that, you’ll create another custom rule using the Guard Policy, a policy-as-code evaluation tool. This rule will check whether a specific security group is attached to your EC2 instance. Any EC2 instance that doesn’t have this security group attached to it will be marked as noncompliant. You’ll then check the compliance status of the EC2 security groups, which would be created along with the EC2 instances. Once you’ve created and deployed these custom rules, you’ll learn about the conformance pack. You will deploy additional rules using the conformance pack. After deploying the conformance pack, you’ll check its dashboard to see whether resources are continuously monitored and evaluated for compliance against the desired configurations.

After finishing this Cloud Lab, you’ll be well-equipped to use the AWS Config to monitor AWS resources. You’ll also be able to enforce compliance on the noncompliant resources, making sure that no AWS resource violates your organization’s policies.

The following is a high-level architecture diagram of the infrastructure you’ll set up in this Cloud Lab:

Architecture diagram
Architecture diagram

Cloud Lab Tasks
1.Introduction
Getting Started
2.Setup AWS Config
Start the Configuration Recorder
3.Custom Rule using Lambda
Create a Lambda function
Create the Custom Lambda Rule
Launch EC2 Instances
Add a Remediation Action
4.Custom Rule using Guard
Create a Custom Policy Rule
Check Compliance of the Provisioned Resources
5.Conformance Packs
Create Conformance Pack Template
Set Up Noncompliant Infrastructure
Deploy the Conformance Pack
6.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Before you start...

Try these optional labs before starting this lab.

Relevant Course

Use the following content to review prerequisites or explore specific concepts in detail.

Trusted by 1.4 million developers working at companies including

Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg
Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

Get access to Educative Cloud Labs

Course Footer Image
Course Footer Image