Improved AWS IAM User Authentication: Automatic Recovery and Better Guidance
Atmos now automatically detects when your AWS IAM User credentials have been rotated or revoked and prompts you for new credentials inline. No more persistent authentication failures after credential rotation. Plus, improved guidance when credentials expire.
What Changed
This release improves the AWS IAM User authentication experience with automatic recovery and better guidance:
Automatic Credential Recovery
When atmos auth login encounters an InvalidClientTokenId error from AWS STS, it now:
- Automatically clears stale credentials from the keyring
- Prompts for new credentials inline - no separate configure command needed
- Retries authentication with the new credentials
- Provides actionable error messages if prompting is cancelled
Improved Status and Guidance
auth whoaminow shows session token expiration and displays a warning with recovery instructions when credentials are invalidauth execnow provides a helpful tip when subprocesses fail due to expired credentials
Session Duration Fix
A bug was fixed where session duration configured via atmos auth user configure was not being used,
causing tokens to expire after 12 hours instead of the configured 36 hours.
Applies To
This enhancement applies to AWS IAM User identities (aws/user kind). Other identity types like AWS SSO, assume-role, and permission-set are not affected as they use different authentication flows.
The Problem
Previously, if your AWS access keys were rotated or revoked on the AWS side:
- Your session token would expire (normal)
atmos auth loginwould fail with a cryptic erroratmos auth logout+atmos auth loginwouldn't fix it- Only full user reconfiguration would work
This was frustrating because it broke developer workflows unpredictably.
