Why Does AWS CLI Return Access Denied After SSO Configuration?
Short answer
C The credentials from the IAM Identity Center federated role have expired.
Question
Key Takeaways
The exam tests your understanding that IAM Identity Center issues temporary credentials that expire, and expiration can manifest as Access Denied even when the underlying permission set is correct and unchanged.
When AWS Single Sign-On (IAM Identity Center) credentials expire, AWS CLI and SDK API calls fail with Access Denied errors. Community consensus identifies temporary credential expiration as the most likely cause when configuration files remain unchanged.
Common mistake: Choosing B (permission set lacks permissions) is common because Access Denied usually suggests an IAM permissions problem, but the question explicitly states that configuration hasn't changed and the calls were previously working, making credential expiration a more likely explanation.
Expert Analysis
Why the Answer Is Correct
IAM Identity Center (AWS SSO) issues federated role credentials that are temporary by design, with a configurable session duration. When those credentials expire, the AWS CLI and SDKs can no longer authenticate API calls, and the service returns Access Denied. Because the developer has not changed configuration files, scripts, or permission sets, the sudden onset of errors strongly suggests that the cached SSO credentials have simply exceeded their lifetime. Comment [1] with 4 likes reinforces that SSO credentials are temporary and typically come with an expiration time. This makes C the most logical and direct answer.
Why the Other Options Are Wrong
A is unlikely because changes to the CLI binary file permissions would cause a different error, such as "permission denied" when executing the binary, not an Access Denied response from AWS services. B suggests the permission set is missing required actions, but the question states everything was working before and no configuration has changed; permission sets do not spontaneously lose permissions without an administrative change. D (wrong account) could produce an error, but the same credentials and CLI configuration that previously worked would not suddenly point to a different account without a config change. Therefore, C is the only option that aligns with the scenario's unchanged environment and the known behavior of SSO temporary credentials.
Community Comment Notes
The community overwhelmingly voted for C with 100% of votes. Comment [1] (likes=4) highlights that AWS SSO credentials are temporary and expire. Comment [2] (likes=3) points to the official AWS Identity documentation, which explains the nature of temporary security credentials. Comment [3] (likes=1) simply affirms C. The consensus is clear: when a previously working setup begins returning Access Denied without any configuration changes, credential expiration is the first thing to investigate.
Official Reference
- https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html
- https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
These links open the official vendor documentation in a new tab.
Exam Strategy
For AWS CLI/SDK access issues in exam questions, look for clues like 'previously working' and 'no changes made.' If an answer mentions credential expiration, that is often the correct choice because IAM Identity Center issues temporary credentials with a finite lifetime. Always associate SSO with temporary, expiring credentials rather than permanent IAM users.
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
cachac 👍 4 Answered CAWS SSO credentials are temporary and typically have an expiration time
-
KarBiswa 👍 3 Answered Chttps://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html
-
65703c1 👍 1 Answered CC is the correct answer.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →