← 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 filesv1.0.0 (updated 2026-08-02)
YAMLMarkdownJSONAWSAzureGCP

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 .yaml preview

policies/gcp/custom-roles.yaml # GCP custom roles — least-privilege equivalents. Create with: # gcloud iam roles create <ID> --project=REPLACE_PROJECT --file=<this-split-per-role>.yaml --- title: CI Deployer description: Push to one Artifact Registry repo and deploy one Cloud Run service. stage: GA includedPermissions: - artifactregistry.repositories.uploadArtifacts - artifactregistry.repositories.downloadArtifacts - run.services.update - run.services.get # NOTE: scope to the repo/service via IAM binding conditions on the resource, # since GCP custom roles grant permissions, not resource scope. --- title: App Storage ReadWrite description: Read/write objects in one bucket (bind on the bucket, not project). stage: GA includedPermissions: - storage.objects.get - storage.objects.create - storage.objects.delete - storage.objects.list --- title: Secrets Consumer description: Access a specific secret's versions (bind on the secret resource). stage: GA includedPermissions: - secretmanager.versions.access --- title: Read-Only Auditor description: Describe/list infra without reading object data. stage: GA includedPermissions: - resourcemanager.projects.get - compute.instances.list - iam.roles.list - iam.serviceAccounts.list - logging.logEntries.list