The first time I ran aws configure and realized my credentials were tangled across projects, I knew there had to be a better way to manage cloud access. Profiles were meant to help. They didn’t go far enough.
AWS CLI-style profiles are powerful, but they stop short when you need consistent, automated, and enforceable rules across environments. That’s where Policy-as-Code shines: taking the flexibility of profiles and pairing them with security policies you can version, audit, and test—just like your application code.
With AWS CLI-style profiles, you can store named sets of credentials and settings locally. Handy, but when you’re managing dozens—or hundreds—of cloud accounts, local configuration files become a fragile single point of truth. Developers override them. Old access keys linger. Auditors frown. Policy-as-Code solves this by ensuring every profile is backed by a defined, reviewed, and approved policy stored in your repository.
Imagine each profile mapping to a strict definition: which accounts it can touch, which services it can call, which resources it can read or write. No loose IAM policies floating in a dashboard somewhere. No mystery permissions. Instead, every permission is born from code, Git commits, and automated checks.