The cleanest way to control this chaos is with AWS CLI-style profiles and S3 read-only roles. No bloated IAM permissions. No guesswork. Just fast, safe, and predictable access.
Why AWS CLI-Style Profiles Matter
When you manage multiple roles, accounts, or buckets, static credentials can slow you down and increase risk. AWS CLI profiles let you define named configurations in your ~/.aws/config file, separating each role cleanly. You switch roles with one flag instead of exporting keys or copying them around.
Profiles work with MFA, cross-account roles, and scoped permissions. They reduce human error because you aren’t constantly juggling credentials.
Building for Least Privilege with S3 Read-Only Roles
S3 read-only roles are the perfect match for profiles. They allow listing and reading bucket contents without the ability to delete or upload. By limiting each role to s3:GetObject and s3:ListBucket, you block most destructive actions by default.
Attaching these roles to CLI profiles creates a predictable workflow:
- Write access is never assumed unless needed
- Read access is quick and safe to switch into
- Every operation is logged with AWS CloudTrail
Example Setup
1. Configure the profile:
aws configure --profile s3-readonly
2. Edit ~/.aws/config: