AWS IAM: User Access Control and User Management

AWS IAM helps you control access to your AWS services and resources

AWS IAM (Identity and Access Management) is a web service that helps you securely control access to AWS services and resources.

The service allows you to create and manage AWS users and groups within your account, and use permissions to permit or deny their access to AWS resources. A user is an identity (within an AWS Account) with unique security credentials that can be used to access AWS Services.

Without IAM, organizations with multiple users and systems would be forced to either create multiple AWS accounts, each with its own billing and subscriptions to AWS products, or employees would all have to share the security credentials of a single AWS account. There would be no way to control the tasks a particular user or system could perform and which AWS resources they might use.

Limiting user access with AWS IAM:

With IAM, you can control who can access which resources. For example, you can create individual users, each with their own user name, password, and access keys. You can assign them unique authority over precisely the resources and services they need.

Whenever a person or application communicates with an AWS resource, they are asked for security credentials. These credentials are helpful in classifying who is making the call and whether or not to allow the requested access.

But why not just rely on a single identity? Whenever you log into your AWS account using your email address and password, you get full access to all your account’s resources. Because that kind of access is very difficult to properly control, AWS suggests that you use only IAM credentials for your everyday interactions with AWS, and lock away your account credentials.

AWS IAM allows you to:

1. Create individual IAM users and groups to assign permissions to IAM users

You could, for example, set up an Administration Group as soon as you create your account. You could then add to it all the IAM users who will need administrator rights to your account. Now, they – and only they – will have full rights over your account resources.

2. Enable AWS Multi-Factor Authentication (AWS MFA) for privileged users

To help prevent fraudulent access, AWS recommends that you use multi-factor authentication (MFA) in addition to your AWS account’s email address and password. A device (like a smartphone) in the possession of MFA users can be configured to generate a unique authentication code and provide extra security.

3. Request temporary security credentials

For users or apps requiring on-demand access to your services and resources, AWS IAM allows you to offer one-off permissions, further limiting your exposure to risk.

4. Force your users to choose strong passwords

You can require that your users create passwords of a defined strength (minimum length, non-alphabetic characters, etc.) and that they change them regularly.

5. Rotate credentials regularly and remove unnecessary credentials

Remove unused IAM user credentials (i.e., passwords and access keys). For example, an IAM user that is used exclusively for an application does not need a password (passwords are necessary only to sign in to AWS websites). Similarly, if a user does not and will never use access keys, there’s no reason for the user to have them.

6. Use AWS IAM roles for applications running on Amazon EC2 instances

In order to access other AWS services, applications that run on an Amazon EC2 instance need credentials. Here IAM plays a vital role in providing these credentials to the applications in a secure way. A role is an entity that has its own set of permissions, but that isn’t a user or group.

AWS IAM dynamically provides temporary credentials to an EC2 instance, and these credentials are automatically rotated for you.

7. Use policies for extra security

You can apply permissions to an IAM principal entity (an IAM user, group or role) by attaching a custom policy to the principal entity.

For example, you can write conditions to specify a range of allowable IP addresses that a request must come from, or specify that a request is allowed only within a specified date or time range. You can also set conditions that require the use of SSL or MFA (multi-factor authentication). For example, you can require that a user has authenticated with an MFA device in order to be allowed to terminate an Amazon EC2 instance.

You can attach multiple policies to a principal entity, and each policy can contain multiple permissions.

AWS IAM user management

One cannot set usage quotas on IAM users, as all limits apply to the AWS account as a whole. So for example, if your AWS account has a limit of twenty Amazon EC2 instances, any IAM user with EC2 permissions will be able to launch up to that limit (assuming that there are no other instances associated with other account users).

While there is no limit to the number of AWS IAM roles you can assume, you can only act as one IAM role when making requests to AWS services. You are however limited to a maximum of 250 IAM roles for a single account. If you need more roles, submit an IAM limit increase request form with your use case and your AWS IAM role increase will be considered.

Conclusion

Protect your AWS environment by using the high-level security of AWS IAM. It costs nothing extra and greatly strengthens the value of your username and password credentials.

If you want to get a jump start on IAM, check out Cloud Academy’s Overview of AWS Identity & Access Management (IAM) course. 

Cloud Academy