The pager went off at 2:14 a.m. and the AWS account was locked. No console. No normal IAM role. Just you, the CLI, and a situation that will be ugly if you don’t act fast.
Break-glass access in AWS CLI is the lifeline for critical recovery when standard authentication fails or needs to be bypassed for emergencies. Done right, it’s the fastest path to restoring control. Done wrong, it’s a blast radius waiting to happen.
What Break-Glass Access Means
Break-glass access is a pre-authorized emergency override. In AWS CLI, it means you have a minimal, secure, and well-monitored way to assume elevated permissions through the command line. It exists for rare, high-impact incidents—revoked credentials, compromised SSO, or production failures that block normal workflows.
Principles for Secure AWS CLI Break-Glass Access
- Pre-Provision Credentials – Generate limited-scope IAM access keys stored in a hardware secure module or encrypted vault that’s inaccessible in normal operations.
- Isolation – Use a dedicated IAM policy granting only the permissions required for recovery. Never reuse a standard admin role.
- Multi-Factor Access – Bind emergency credentials to MFA, even for CLI usage. Require challenge-response before activation.
- Time-Bound Sessions – Enforce short session durations with automatic credential revocation.
- Immutable Logging – Send every CLI command and API call to a central, tamper-proof log destination for forensic review.
- Periodic Drills – Practice recovery. Test the stored credentials with non-production resources to keep the process fresh.
The AWS CLI Commands That Matter
When executing a break-glass workflow, clarity matters. Know your steps and run them with precision.