Introduction
Sometimes you need to access AWS resources temporarily with different permissions. Assuming a role lets you get temporary access without sharing permanent credentials.
When a developer needs to access a production AWS account from their personal account safely.
When an application running on one AWS account needs to access resources in another account.
When you want to give temporary access to a contractor without creating a permanent user.
When automating tasks that require elevated permissions only for a short time.
When switching between different permission sets in your own AWS environment.