Identity and Access Management
A service caches AWS STS credentials at startup and successfully calls AWS APIs for an hour before requests fail with ExpiredToken. What should the engineer do to restore reliable authentication?
Show the answer
Correct answerC. Refresh temporary credentials before their expiration time.
AWhy not this: The service already obtained credentials successfully; changing trust does not renew them.
BWhy not this: Changing the maximum session duration does not extend the lifetime of credentials already issued.
CWhy this is right: Obtaining fresh credentials before expiration prevents continued use of an expired session.
DWhy not this: Missing permissions cause authorization failures, not expiration of previously working credentials.
ExpiredToken indicates that the service is using expired temporary credentials, so it must obtain and use fresh credentials. Increasing a role's maximum session duration does not extend credentials that have already been issued.