Interview Prep/AWS/IAM Best Practices

How do you structure roles for an application with several components?

BeginnerProductionIAM Best Practices
Answer

One role per component per environment (orders-api-prod, orders-worker-prod), never a shared "app role". Each has only the actions and resources that component needs. Use role paths (/app/orders/) so PassRole and boundaries can match patterns. Shared roles make blast radius larger and make CloudTrail investigation harder because you cannot tell which component made a call.

aws All AWS questions Roadmap: AWS core services

More on IAM Best Practices