Skip to content
IAM Policy Generator

60 AWS IAM policy examples, each with a least privilege rewrite

AWS IAM policy examples based on AWS documentation, each with a plain-English reading, the number of actions it grants on 16 Nov 2026 and a least privilege rewrite. Each example opens in the workbench, where you can change it and watch the counts and the six checks update in your browser, with nothing uploaded.

Open the workbench ยท Policy types

ExampleTypeServiceActions grantedFlags
IAM policy example: read one S3 bucketidentitys3810
IAM policy example: read and write one S3 bucketidentitys31800
IAM policy example: give each user an S3 home folderidentitys31810
IAM policy example: deny S3 requests without TLSidentitys31800
IAM policy example: require KMS encryption on S3 uploadsidentitys3400
IAM policy example: list S3 buckets in the consoleidentitys3190
IAM policy example: upload to one S3 prefixidentitys31800
IAM policy example: limit S3 access to a VPC endpointidentitys31800
IAM policy example: read EC2 inventoryidentityec21950
IAM policy example: start and stop tagged EC2 instancesidentityec28340
IAM policy example: limit EC2 actions to one Regionidentityec28341
IAM policy example: launch EC2 instances in one subnetidentityec210
IAM policy example: snapshot tagged EBS volumesidentityec231
IAM policy example: invoke one Lambda functionidentitylambda1351
IAM policy example: deploy code to one Lambda functionidentitylambda150
IAM policy example: let a Lambda function write logsidentitylogs1331
IAM policy example: let Lambda poll one SQS queueidentitysqs201
IAM policy example: read one DynamoDB tableidentitydynamodb340
IAM policy example: read and write one DynamoDB tableidentitydynamodb850
IAM policy example: limit DynamoDB items to the calleridentitydynamodb50
IAM policy example: read a DynamoDB streamidentitydynamodb850
IAM policy example: let users manage their own MFA deviceidentityiam101
IAM policy example: change your own password and keysidentityiam60
IAM policy example: let a user pass one role to Lambdaidentityiam12
IAM policy example: let a team create roles under one pathidentityiam50
IAM policy example: read IAM configuration for an auditidentityiam730
IAM policy example: use one KMS key to encrypt and decryptidentitykms581
IAM policy example: use a KMS key only through S3identitykms70
IAM policy example: administer KMS keys without using themidentitykms361
IAM policy example: read one Secrets Manager secretidentitysecretsmanager271
IAM policy example: read Secrets Manager secrets by tagidentitysecretsmanager50
IAM policy example: read a Parameter Store pathidentityssm300
IAM policy example: write parameters under a team pathidentityssm30
IAM policy example: read one CloudWatch Logs groupidentitylogs390
IAM policy example: write to one log groupidentitylogs1331
IAM policy example: read CloudTrail eventsidentitycloudtrail661
IAM policy example: send messages to one SQS queueidentitysqs201
IAM policy example: consume messages from one SQS queueidentitysqs50
IAM policy example: publish to one SNS topicidentitysns411
IAM policy example: put events on one EventBridge busidentityevents741
IAM policy example: pull images from one ECR repositoryidentityecr651
IAM policy example: push images to one ECR repositoryidentityecr60
IAM policy example: run ECS tasks in one clusteridentityecs932
IAM policy example: read EKS cluster details for kubeconfigidentityeks741
IAM policy example: invoke one Bedrock foundation modelidentitybedrock2691
IAM policy example: invoke Bedrock models with streamingidentitybedrock30
IAM policy example: let EC2 assume a roletruststs12
IAM policy example: let Lambda assume an execution roletruststs11
IAM policy example: cross-account role with external IDtruststs10
IAM policy example: trust GitHub Actions through OIDCtruststs10
IAM policy example: trust one EKS service accounttruststs10
IAM policy example: trust a service for one resource onlytruststs11
IAM policy example: trust a SAML identity providertruststs10
IAM policy example: trust Identity Center rolestruststs11
IAM policy example: S3 bucket policy for TLS and orgresources31810
IAM policy example: write a KMS key policyresourcekms672
IAM policy example: let an SNS topic send to an SQS queueresourcesqs10
IAM policy example: let S3 invoke a Lambda functionresourcelambda10
IAM policy example: SNS topic policy for alarmsresourcesns10
IAM policy example: ECR policy for cross-account pullresourceecr70

Sources

  1. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.