Design Secure Architectures
An application assumes a role whose identity policy allows reading and deleting objects in an S3 bucket. One job needs a session that can only read those objects, without changing the role or affecting other sessions. What should the application do?
Show the answer
Correct answerC. Pass a session policy that allows only object reads.
AWhy not this: A trust policy controls who can assume the role, not which S3 operations the resulting session can perform.
BWhy not this: A role permissions boundary would constrain the role generally rather than only the selected session.
CWhy this is right: A session policy narrows that session's permissions without changing the role or other sessions.
DWhy not this: Replacing the role policy changes the permissions available to other sessions using that role.
A session policy limits the permissions of the individual assumed-role session to the intersection with the role's permissions. A permissions boundary applies to the role rather than only the selected job's session.