Skip to main content

AWS IAM: how to master Amazon authentication in 5 steps

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.

Written by

My professional IT career began nine years back when I was just out of my college. I worked with a great team as an infrastructure management engineer, managing hundreds of enterprise application servers. I found my passion when I got the opportunity to work with Cloud technologies: I'm addicted to AWS Cloud Services, DevOps engineering, and all the cloud tools and technologies that make engineers' lives easier. Currently, I am working as a Solution Architect in SixNines IT. We are an experienced team of engineers that have helped hundreds of customers move to the cloud responsibly. I have achieved 5 AWS certifications, happily helping fellow engineers across the globe through my blogs and answering questions in various forums.

Related Posts

Khash Nakhostin
— November 13, 2018

Understanding AWS VPC Egress Filtering Methods

Security in AWS is governed by a shared responsibility model where both vendor and subscriber have various operational responsibilities. AWS assumes responsibility for the underlying infrastructure, hardware, virtualization layer, facilities, and staff while the subscriber organization ...

Read more
  • Aviatrix
  • AWS
  • VPC
— November 10, 2018

S3 FTP: Build a Reliable and Inexpensive FTP Server Using Amazon’s S3

Is it possible to create an S3 FTP file backup/transfer solution, minimizing associated file storage and capacity planning administration headache?FTP (File Transfer Protocol) is a fast and convenient way to transfer large files over the Internet. You might, at some point, have conf...

Read more
  • Amazon S3
  • AWS
— October 18, 2018

Microservices Architecture: Advantages and Drawbacks

Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs).Microservices have become increasingly popular over the past few years. The modular architectural style,...

Read more
  • AWS
  • Microservices
— October 2, 2018

What Are Best Practices for Tagging AWS Resources?

There are many use cases for tags, but what are the best practices for tagging AWS resources? In order for your organization to effectively manage resources (and your monthly AWS bill), you need to implement and adopt a thoughtful tagging strategy that makes sense for your business. The...

Read more
  • AWS
  • cost optimization
— September 26, 2018

How to Optimize Amazon S3 Performance

Amazon S3 is the most common storage options for many organizations, being object storage it is used for a wide variety of data types, from the smallest objects to huge datasets. All in all, Amazon S3 is a great service to store a wide scope of data types in a highly available and resil...

Read more
  • Amazon S3
  • AWS
— September 18, 2018

How to Optimize Cloud Costs with Spot Instances: New on Cloud Academy

One of the main promises of cloud computing is access to nearly endless capacity. However, it doesn’t come cheap. With the introduction of Spot Instances for Amazon Web Services’ Elastic Compute Cloud (AWS EC2) in 2009, spot instances have been a way for major cloud providers to sell sp...

Read more
  • AWS
  • Azure
  • Google Cloud
— August 23, 2018

What are the Benefits of Machine Learning in the Cloud?

A Comparison of Machine Learning Services on AWS, Azure, and Google CloudArtificial intelligence and machine learning are steadily making their way into enterprise applications in areas such as customer support, fraud detection, and business intelligence. There is every reason to beli...

Read more
  • AWS
  • Azure
  • Google Cloud
  • Machine Learning
— August 17, 2018

How to Use AWS CLI

The AWS Command Line Interface (CLI) is for managing your AWS services from a terminal session on your own client, allowing you to control and configure multiple AWS services.So you’ve been using AWS for awhile and finally feel comfortable clicking your way through all the services....

Read more
  • AWS
Albert Qian
— August 9, 2018

AWS Summit Chicago: New AWS Features Announced

Thousands of cloud practitioners descended on Chicago’s McCormick Place West last week to hear the latest updates around Amazon Web Services (AWS). While a typical hot and humid summer made its presence known outside, attendees inside basked in the comfort of air conditioning to hone th...

Read more
  • AWS
  • AWS Summits
— August 8, 2018

From Monolith to Serverless – The Evolving Cloudscape of Compute

Containers can help fragment monoliths into logical, easier to use workloads. The AWS Summit New York was held on July 17 and Cloud Academy sponsored my trip to the event. As someone who covers enterprise cloud technologies and services, the recent Amazon Web Services event was an insig...

Read more
  • AWS
  • AWS Summits
  • Containers
  • DevOps
  • serverless
— July 11, 2018

AWS Certification Practice Exam: What to Expect from Test Questions

If you’re building applications on the AWS cloud or looking to get started in cloud computing, certification is a way to build deep knowledge in key services unique to the AWS platform. AWS currently offers nine certifications that cover the major cloud roles including Solutions Archite...

Read more
  • AWS
— June 26, 2018

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to compute resources including CPU, memory, storage, and network connectivity. Which resources you choose for your delivery, cloud-based or local, is up to you. But you’ll definitely want to do your homework first.Cloud ...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud