This hands-on exercise shows how to find non-compliant resources in AWS Config and how to whitelist them for Config. |
In this exercise, you will use Access Analyzer to find an IAM Role role that allows access from an outside AWS account and remove that access.
We have prepared this AWS accounts with roles named example-role-NETID for each of the training participants.
In real life situations, note that the bad-actor Role didn't have anything to do with our creation of the example-role-NETID Role in our account and trusting the bad-actor Role. Someone (or something) with appropriate IAM privileges to our account is the only way that example-role-NETID was created or configured. |
Part 1C – Remove access by the bad-actor Role
In this exercise scenario, we named the outside role bad-actor. In real life, roles are not usually so conveniently named. Also, note that just because a Role within your AWS account trusts IAM Roles or Users from another account, it doesn't mean that access is inappropriate or unnecessary. Cross-account access is perfectly fine and often necessary. For example, that is how CloudCheckr accesses our Cornell AWS accounts to do the information gathering it does to provide its services to Cornell. |
For the purposes of this exercise, we'll claim that bad-actor no longer has need for the cross-account access defined in example-role-NETID. To remove that access, we have two options:
The appropriate course of action depends on the situation. For the purposes of this example, we'll just delete the example-role-NETID Role since, in our scenario, none of our own tools or access uses example-role-NETID.
In this exercise, you will use Access Analyzer to archive a finding allowing public access to an S3 bucket. This indicates one-time review and approval for that access.