From identity to access Step 1 of 2

Estimated reading time: 2 min read

Authentication verifies the identity making a request. Authorization decides whether that identity can perform an action on a resource in that context. You can authenticate successfully and still receive an access denied response.

A person verifies their identity with a badge. A key then opens only the circular compartment of a cabinet with three distinct permission boundaries.

After verifying identity, the service evaluates whether the action is allowed on the requested resource.

Identity and credentials

Authentication checks who is making a request. It may use a session, a certificate, or temporary credentials; it does not always depend on a password.

In AWS, an application can call a service using an IAM role’s credentials. Recognizing that role does not imply that all its operations are allowed.

Permissions by action and resource

Authorization considers the action, resource, and conditions of a request. Someone may sign in and have permission to view a report but not delete it: reading and deleting are different actions.

An AccessDenied response may mean the identity was recognized and the operation was denied. AWS evaluates applicable policies, and an explicit deny takes precedence. Adding an Allow without reviewing those policies may not solve the problem.

An operation involving several services

Reading an encrypted S3 object may require permissions in both S3 and KMS, the service that manages encryption keys. Access to the object does not by itself prove that the role can decrypt it.

To diagnose the failure, identify the role making the request and inspect the action, resource, and applicable policies in each service.

Testing an IAM policy

The IAM policy simulator estimates whether a principal can perform a given action on a resource under the supplied conditions. Simulate the failing request with the relevant context, then verify the operation in the application. The simulator evaluates policies in isolation and has limits on the policies and scenarios it can model.

Sources and further reading

All fundamentals