Ravi Sir's Cards › AWS
Trust policy vs permissions
This revision card explains Trust policy vs permissions. It starts from the need that people mix “who may assume this role” with “what the role can do”. It describes trust policy (role only): who can AssumeRole (EC2, Lambda, account…). Permissions policy: Allow/Deny API actions on resources. The how-to section notes EC2 role trust Principal Service ec2.amazonaws.com; permissions allow s3:GetObject on lab bucket. An example on the card is lambda cannot assume an EC2-only trust; you create a separate Lambda execution role.
Read card text
What this card says
Why do we need it?
People mix “who may assume this role” with “what the role can do”.
What is it?
Trust policy (role only): who can AssumeRole (EC2, Lambda, account…). Permissions policy: Allow/Deny API actions on resources.
AssumeRole
How to do it
EC2 role trust Principal Service ec2.amazonaws.com; permissions allow s3:GetObject on lab bucket.
Example
Lambda cannot assume an EC2-only trust; you create a separate Lambda execution role.