Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Setting up Automatic Resource Remediation with AWS Config

Welcome to this AWS hands-on lab, Setting up Automatic Resource Remediation with AWS Config. This activity provides you with the opportunity to get hands-on experience creating rules in AWS Config and implementing remediations using Lambda functions. This approach helps maintain a highly-secure networking architecture inside of AWS. Good luck and enjoy the hands-on lab! Resources for this activity are on the [Github Repository](https://github.com/julielkinsfembotit/LALabsAWSConfig). **NOTE**: CloudWatch Events is now EventBridge. You'll be able to now create rules in Amazon EventBridge Event Rules. We also use a pool of shared AWS accounts for our lab environments. Once the previous user's lab is terminated, we have a cleaner that reclaims any AWS resources, including EC2 instances, S3 buckets, etc. This prepares the environment for you to use it next. However, because Config uses CloudTrail as the source of its data, and CloudTrail records can't be deleted, Config sometimes sees resources that no longer exist. To resolve it, we recommend you turn Config off and back on again in Config's settings. Please see the note on this in the lab instructions to help. Also please note that Config can take a very long time to synchronize, possibly 20 minutes or more.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 30m
Published
Clock icon Nov 20, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create AWS Config Rule

    Create AWS Config Rule:

    1. Create an S3 bucket for AWS Config (the default name is fine)
    2. Choose role for AWS Config to send data to S3
    3. Use search box and type in SSH
    4. Choose the restricted-ssh Rule
    5. Review and confirm
  2. Challenge

    Create SNS Topic

    • Create SNS Topic:
      1. Create topic
      2. Add name: mytopic
    • Create SNS Subscription:
      1. For Protocol select Email
      2. Add your personal email address
      3. Click Confirm Subscription
      4. Go to your email account
      5. Confirm your SNS subscription
  3. Challenge

    Create Lambda Function

    • Create Lambda function:
      1. Click Create Function
      2. Add name: remediatesg
      3. Choose Python 3.6, 3.7, or later
      4. Choose existing IAM role
      5. Click Create Function
      6. Delete provided function code
      7. Use the GitHub link and copy the function code, then paste it into the Lambda console function code box
      8. Click Save

    Note: If AWS Config has trouble detecting changes after a reasonable amount of time, go into AWS Config Settings and toggle it off and on again.

  4. Challenge

    Create CloudWatch Rule

    • CloudWatch Events is now EventBridge. You'll be able to now create rules in Amazon EventBridge Event Rules.
      1. Click into Rules in left navigation
      2. Click Create Rule
      3. Select Schedule not Event
      4. Add 1 minute
      5. Select Target, add Lambda Function remediates
      6. Click Create rule

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans