That’s the truth most teams ignore until it’s too late. AWS CLI makes infrastructure easy to touch, easy to change, and easy to break. The same power that gives developers speed also gives attackers an open door if long‑lived credentials exist. That’s why Zero Standing Privilege is no longer optional. It’s the baseline.
What Zero Standing Privilege Means in AWS CLI
Zero Standing Privilege removes any permanent access. No user or system holds credentials that can reach production unless they are explicitly summoned, approved, and expire quickly. In practice, it means no aws configure with static keys sitting in ~/.aws/credentials. It means no IAM roles with endless admin rights linked to a developer account. It means trust that is temporary, scoped, and revocable.
In AWS CLI, enforcing Zero Standing Privilege starts with removing static IAM access keys from human accounts. Replace them with just‑in‑time, short‑lived credentials tied to role assumptions. Use AWS STS assume-role for a defined session duration, and ensure session policies match least privilege. This isn’t just a security enhancement; it’s a control that cuts the blast radius and time window for any compromise.
Why Permanent Keys Are a Risk Multiplier
Permanent AWS CLI credentials often leak through code repositories, logs, or endpoint breaches. Automated scans from threat actors are constant. Once a static AWS access key and secret are exposed, the attacker gains the same CLI power the owner has — from spinning up compute to stealing S3 data. Rotating keys helps, but it’s still reactive. Zero Standing Privilege eliminates the risk category by design.
Enforcing Session‑Based Access
- Remove all persistent IAM user keys from human-operated accounts.
- Define IAM roles with precise permissions for each task or environment.
- Require session‑based login via AWS SSO, SAML, or OIDC.
- Use AWS STS tokens with defined expiration (e.g., 1 hour).
- Audit and log all role assumptions with CloudTrail and verify delegation in IAM Access Analyzer.
A mature setup also automates approval workflows for role access. The request, the grant, and the expiration all happen without manual cleanup. Users get access just long enough to do their job — nothing more.