Interview Prep/AWS/IAM, Organizations and Multi-Account

A product team wants to give an external vendor limited access to one account. Design it safely.

AdvancedScenarioIAM, Organizations and Multi-Account
Answer

Situation read → Third-party access must prevent the confused deputy problem and be revocable.

What I'd do →

  1. Create a role in your account trusting the vendor's account with sts:ExternalId condition set to a unique value you generate
  2. Attach a narrowly scoped policy plus a permissions boundary
  3. Require aws:MultiFactorAuthPresent only if their human flow supports it, otherwise limit by aws:SourceIp
  4. Alert on the role's use via CloudTrail and set MaxSessionDuration to 1 hour

Why → ExternalId stops another customer of the same vendor from tricking the vendor into using your role.

Interview tip → Say "confused deputy" by name.

aws All AWS questions Roadmap: AWS core services

More on IAM, Organizations and Multi-Account