Sign in to your Lab’s AWS Console following the instructions provided
Make sure your selected region is Oregon
Go to Services search box > Config
Click
In the Settings page, leave defaults and click on
In the Rules page, leave defaults and click on
In the Review page, click on
AWS Config will start, you can close the “Welcome to AWS Config” window.
Now we will create our first Config rule, it will check whether any security groups with inbound 0.0.0.0/0 have TCP or UDP ports accessible. The rule is NON_COMPLIANT when a security group with inbound 0.0.0.0/0 has a port accessible which is not specified in the rule parameters. In your left panel, click on Rules
Click on
In the AWS Managed Rules search box, type: vpc-sg-open-only-to-authorized-ports
Select the managed rule and click
In the Configure rule page, in the Trigger section, select Tags.
Under Resources by tag, type Compliance
in the Tag Key box, and Prod
in the Tag value box
Under Parameters, you will authorize only port 80
to be open to the internet
Click on
In the Review and create page click
Click on the Rule you just created, under Resources in scope, select All. after a couple of minutes you will see a security group in Compliant status
NOTE: you may need to refresh the displayed information on the rule console, click on the refresh botton
Now we will make a change on the security group inbound rule, and open port 22 to the internet, so this resource change its status to Noncompliant
Go to Services search box > VPC
On the left pane, under the Security section, click on Security Groups
In the Security Group search box, type sc-web-secgroup-
, and click on the lookup result
Note: You will notice this Security Group was created as part of your Service Catalog application deployment
In the below panel, click on Inbound rules
Click on
Click on
You will edit the second rule line just added, in the inbound Type, select SSH and in Source select Anywhere IPv4
Click
Now return to Config console. Services search box > Config
On the left pane, click on Rules
Click on the rule you previously created, under Resources in scope, select All, after a minute the rule Resource compliance status will change from Compliant to Noncompliant
NOTE: you may need to refresh the displayed information on the rule console, click on the refresh botton