In AWS, the IAM service is one of the first services you get to know. The system checks who you are and grants access to AWS services. Authentication and authorisation are separate, but to make full use of IAM you often use an intermediate step: assuming a role.
Steps in the AWS security process
Step 1: Authentication
Authentication determines whether you are who you claim to be. This can be done with a username and password, API calls with access keys, or external identity providers such as SSO. Two-factor authentication and other checks strengthen this process. Authentication proves your identity, but doesn’t yet grant access to resources.
Step 2: Assuming a role (Switch Role)
Alongside authentication and authorisation, assuming a role plays a key part in AWS. After authenticating, you can assume a specific role, which gives you access to the resources you need.
Say you work with multiple AWS accounts. You log in through a central identity provider and assume a role that grants permissions specifically within one account. This separates authentication from authorisation and offers flexibility. Within a single account you can also use several roles, depending on your task.
An example: an SRE or Ops engineer often needs a read-only role for inspection in the console, while automated processes require a role with read-write permissions. That keeps management efficient and secure. Assuming roles also works across multiple accounts, which simplifies managing complex environments.
Step 3: Authorisation
With an active role, AWS determines what you’re allowed to do through policies. These specify the permitted actions and resources.
Configuring policies and roles
Policies and roles are configured in AWS as follows:
- Policies are written in JSON format and contain statements that specify actions and resources
- Roles are identities with attached policies. They don’t have a username/password.
- Roles are assumed after authentication to gain access to resources.
- Preferably, you attach policies to roles, not directly to users or groups: that keeps permissions consistent and easier to manage.
Examples of role usage
A clear example of role assumption shows up in the way different roles are used within a single account:
- Data engineer: This role has read permissions on storage and management permissions on AI services, which is essential for running analyses and managing models. If we assume for a moment that the AI services are provided by a third-party company, the authentication of the person doing this can happen externally. What these external users are allowed to do is still defined in your own AWS account.
- ETL engineer: This role provides write and edit permissions on storage so data can be processed efficiently within the ETL pipeline. This makes it possible to transform and store large datasets. The engineer is part of the company itself, so authentication goes through internal channels. That can be directly in AWS, or through an Active Directory integration, for example.
- Backup automation: An automated process assumes a specific backup role, which only gives it access to read critical data and write backups to a secure storage location. Authentication here goes through AWS’s internal systems, where processes have permission to assume roles without human intervention.
These examples show how roles can be tailored to specific tasks, which makes for secure and purpose-built access management.
Role assumption as the basis for advanced AWS concepts
Role assumption isn’t just for users. It’s also the basis for services such as Pod Identity in EKS and permission management for Lambda functions. Here, applications assume temporary roles, which ensures security and flexibility without fixed credentials.
Krane Labs and AWS IAM best practices
At Krane Labs we don’t just apply IAM best practices, we also help customers optimise their use of AWS IAM by:
- Advising on setting up an optimised multi-account structure
- Implementing least-privilege access models with roles and policies
- Integrating IAM with identity providers for central user management
- Best practices for managing access keys and temporary credentials
- Configuring monitoring and alerting for security risks
It’s worth mentioning that at Krane Labs we get access from our own AWS account to the accounts of the customers we manage through roles. This lets us work efficiently and securely in our customers’ environments, without needing direct access to their credentials and without extra users being created in our customers’ accounts. This approach is an example of the IAM best practices we follow.
Benefits of role assumption
Role assumption offers more security, scalability, flexibility and traceability. It lets organisations manage multiple AWS accounts and makes the separation between authentication and authorisation clear.
Conclusion
IAM is at the core of authentication and authorisation in AWS. With role assumption and the separation between authentication and authorisation, organisations can drastically improve their security and flexibility. At Krane Labs we have extensive experience with IAM in AWS, and we use role assumption ourselves every day to work securely in our customers’ accounts. This system gives us the flexibility to work smoothly in complex multi-account environments. We also actively help our customers improve their use of AWS accounts and role switching. We’re ready to help you make your AWS environment secure and scalable.

