That’s how fast small mistakes with AWS CLI-style profiles can spiral into real damage. These profiles are powerful, but they often carry more data than necessary. Too much data means too much risk. Data minimization is the antidote. It’s the difference between a scoped-down credential good for a single task and a key that can unlock everything.
AWS CLI-style profiles make it easy to store multiple sets of credentials in ~/.aws/credentials. But ease comes at a cost: stale entries, overly broad IAM permissions, debug parameters left behind. Every extra byte of sensitive data in these profiles is another possible breach vector. A cleaner, smaller, purpose-built profile is safer and simpler to maintain.
The principle is simple: store only what you need, no more. Avoid embedding long-term credentials when a short-lived session token will do. Break monolithic profiles into smaller scoped ones: a read-only S3 profile, a DynamoDB query profile, an isolated CI/CD profile. Delete or archive deprecated profiles, and never keep unused access keys hanging around.