ExitLeast privilege: scoping permissions to workload needs1 / 9
Explanation

Translate workload behavior into actions

How to translate required operations into narrowly scoped actions, resources, and conditions, and test that unrelated operations remain denied. · associate

Start with what the workload actually does, not a broad label such as “S3 access.” Our example is an invoice reader that downloads existing objects using known keys under invoices/ in the billing-records bucket. It does not discover keys, upload files, delete objects, or change bucket settings.

Translate each required operation into an IAM action. Reading an object requires s3:GetObject. Listing keys requires s3:ListBucket, which is a separate permission and is unnecessary for this reader. Neither s3:DeleteObject nor the broad action pattern s3:* belongs in its allow statement.

Check the service's Service Authorization Reference for the action, supported resource types, condition keys, and dependent actions. Include dependencies only when the workload needs them; for example, reading an object encrypted with a customer managed KMS key can also require kms:Decrypt on that key.