Challenge - 5 Problems
RoleAssumerMaster
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate2:00remaining
What is the duration of temporary credentials when assuming a role with AWS STS by default?
When you use AWS Security Token Service (STS) to assume a role without specifying the duration, how long do the temporary credentials last by default?
Attempts:
2 left
💡 Hint
Think about the default session duration for AssumeRole API calls.
✗ Incorrect
By default, AWS STS issues temporary credentials valid for 1 hour when assuming a role unless a different duration is specified.
❓ security
intermediate2:00remaining
Which AWS policy element allows a user to assume a specific role?
To allow a user to assume an IAM role, which policy action must be included in the user's permissions?
Attempts:
2 left
💡 Hint
Look for the STS action that grants role assumption capability.
✗ Incorrect
The action "sts:AssumeRole" is required to allow a user or service to assume an IAM role.
❓ Architecture
advanced2:00remaining
Which trust policy snippet correctly allows an EC2 instance to assume a role?
Given an IAM role trust policy, which snippet correctly allows EC2 instances to assume the role?
Attempts:
2 left
💡 Hint
Which AWS service represents EC2 in trust policies?
✗ Incorrect
The service principal for EC2 is "ec2.amazonaws.com" in the trust policy to allow EC2 instances to assume the role.
✅ Best Practice
advanced2:00remaining
What is the recommended maximum session duration for an IAM role to minimize risk?
To reduce security risks, what is the best practice for setting the maximum session duration for an IAM role?
Attempts:
2 left
💡 Hint
Shorter sessions reduce the window for compromised credentials.
✗ Incorrect
Short session durations limit the time temporary credentials are valid, reducing risk if credentials are exposed.
🧠 Conceptual
expert2:00remaining
What happens if you try to assume a role with an expired session token?
If you use AWS STS to assume a role but provide an expired session token, what is the expected behavior?
Attempts:
2 left
💡 Hint
Expired tokens cannot be used to get new credentials.
✗ Incorrect
AWS STS rejects AssumeRole calls with expired tokens and returns an "ExpiredToken" error.