← Back to all products

IAM Least-Privilege Policy Library

$39

Copy-pasteable least-privilege IAM policies for the roles teams actually create (CI deployer, S3 app, Lambda, auditor, secrets consumer) across AWS/GCP/Azure, plus a review checklist.

📁 11 files🏷 v1.0.0 (updated 2026-08-02)
MarkdownJSONYAMLAWSAzureGCP

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) 📦 Download Free Sample

📁 File Structure 11 files

iam-least-privilege-library/ ├── PRINCIPLES.md ├── README.md ├── REVIEW-CHECKLIST.md └── policies/ ├── aws/ │ ├── ci-deployer.json │ ├── lambda-execution.json │ ├── readonly-auditor.json │ ├── s3-app-readwrite.json │ └── secrets-consumer.json ├── azure/ │ └── custom-roles.json └── gcp/ └── custom-roles.yaml

📖 Documentation Preview README excerpt

IAM Least-Privilege Policy Library

A starter library of tight, copy-pasteable IAM policies for the roles teams

actually create — instead of the : policy someone pasted at 2am that never got

fixed. Covers AWS (JSON policies) with GCP and Azure equivalents, plus a review

checklist for tightening what you already have.

Why this exists

Most breaches that start with a cloud role start with an over-broad one:

s3: on , AdministratorAccess handed to a CI runner, a Lambda that can read

every secret. Writing least-privilege policies from scratch is tedious, so people

don't. This library gives you a correct starting point per role that you narrow to

your resource ARNs.

What's inside

  • policies/aws/ — least-privilege JSON policies for common roles:
  • ci-deployer.json — push images, update one ECS service, read specific SSM params.
  • s3-app-readwrite.json — read/write ONE bucket + prefix, nothing else.
  • lambda-execution.json — logs + one queue + one table, scoped by ARN.
  • readonly-auditor.json — describe/list/get across services, no data reads.
  • secrets-consumer.json — GetSecretValue on a tagged subset only.
  • policies/gcp/custom-roles.yaml — equivalent GCP custom roles.
  • policies/azure/custom-roles.json — equivalent Azure custom role definitions.
  • REVIEW-CHECKLIST.md — how to audit and tighten an existing policy.
  • PRINCIPLES.md — the rules (deny by default, scope by ARN, no wildcards on

actions AND resources, condition keys, permission boundaries).

How to use

1. Pick the policy closest to the role you're creating.

2. Replace every REPLACE_* placeholder with your real account id / ARNs / tags.

3. Run it through your provider's policy simulator before attaching.

4. Attach with a permission boundary so the role can never escalate itself.

Requirements

None. Provider CLIs (aws/gcloud/az) if you want to apply the policies.

License

MIT. Use in client work and internal platforms freely.

📄 Code Sample .json preview

policies/aws/ci-deployer.json{ "Version": "2012-10-17", "Statement": [ { "Sid": "PushImagesToOneRepo", "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload", "ecr:PutImage" ], "Resource": "arn:aws:ecr:REPLACE_REGION:REPLACE_ACCOUNT_ID:repository/REPLACE_REPO" }, { "Sid": "EcrAuthTokenIsAccountWide", "Effect": "Allow", "Action": "ecr:GetAuthorizationToken", "Resource": "*" }, { "Sid": "UpdateOneEcsService", "Effect": "Allow", "Action": ["ecs:UpdateService", "ecs:DescribeServices"], "Resource": "arn:aws:ecs:REPLACE_REGION:REPLACE_ACCOUNT_ID:service/REPLACE_CLUSTER/REPLACE_SERVICE" }, { "Sid": "ReadDeployParamsOnly", "Effect": "Allow", "Action": "ssm:GetParameters", "Resource": "arn:aws:ssm:REPLACE_REGION:REPLACE_ACCOUNT_ID:parameter/REPLACE_APP/deploy/*" } ] }
Buy Now — $39 Back to Products