The AWS IAM service lets you control access to your Amazon resources. Here are the five things you should know.

In 2015, Gartner named Amazon Web Services as the leader in cloud Infrastructure as a Service (IAAS). Why? Because AWS services are highly scalable, elastic, available truly on-demand, reasonably priced, and accessible by customers using a web-based UI, APIs, and CLI automation. More importantly: AWS leads the way in providing security to end users. And which service lies at the very center of Amazon security? AWS IAM (Identity and Access Management)

AWS IAM

Using IAM, you can create users, groups, and roles to which you can apply permissions to allow and deny their access to AWS resources such as EC2, RDS, and VPC. IAM lets you grant unique credentials to every user within your AWS account, allowing access only to the AWS services and resources required.

Let’s explore five tools you should use to make the most of everything that IAM has to offer:

1. Simulate your settings using the AWS IAM Policy Simulator

In order to intelligently assign permissions to users, group, and resources, you create policy documents in JSON format specifying the precise access needed. But without properly testing your policies, it’s difficult to be sure that your application and services will behave exactly the way you want. AWS allows you to safely simulate your configuration so you can test and validate your policies.

You can test existing and new polices attached  to IAM users, groups, or roles in your AWS account, simulate real-world scenarios by providing condition keys such as IP address or dates, and test your policies against selected services and selected actions.For example you can test your policy ensure that it allows a user to launch or stop an instance, but not terminate instances.

AWS IAM

2. Know when your AWS IAM access key was last used

Access keys consist of an access id and secret access key. You need these keys when you want to access AWS services using an API, command line or SDK. In the AWS IAM console you can see when these keys were last used. AWS will show you timestamps, regions and the AWS services that were accessed:

AWS IAM

AWS IAM console  also  displays the date and time when an IAM user or root account last accessed the AWS Management Console, forums, Support Center, or Marketplace. Finally you can Download an access key’s “last used” report for your entire account:

AWS IAM

3. AWS IAM Managed Polices 

Managed polices allow you to attach a single access control policy to multiple entities (IAM users, groups, and roles). You can created administrators with limited authority in order to precisely delegate management responsibilities. These administrators might, for instance, have the ability to create users, groups, and roles, but could only grant access using a restricted set of managed policies.

4. Autoformat and review your policy error 

You can enable autoformatting for your JSON policies. Navigate to any policy editing page and make sure that the “Use autoformatting for policy editing” check box is selected. When you then click the Validate Policy button, your policy formatting will be checked, displaying error messages identifying the line number where a JSON error occurs.

5. Cross Account Access

Suppose you use separate AWS accounts for Development and Productions environments. If you need to give access to users or roles in one account to an S3 bucket or Ec2 instances in the other, Cross Account Access can do it. You establish trust between AWS accounts by creating a new IAM role, and modifying an attached IAM policy by adding the customer account number of the client resource.

Conclusion

Besides other IAM best practices available in the official AWS documentation, you can also find more on IAM in Cloud Academy’s full video course, and in this blog post.