Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

AWS IAM Policy Generator — Least-Privilege Policies for S3, DynamoDB, Lambda & More

Write AWS IAM policies without memorizing action names. Add a permission for each service — S3, DynamoDB, SQS, SNS, Lambda, CloudWatch Logs, Secrets Manager, SES, ECR, KMS, CloudFront — choose read, write or full access and the exact resource, and get a valid least-privilege policy JSON with proper ARNs. Add conditions for MFA, source IP and HTTPS, or switch to S3 bucket policy mode for CloudFront, cross-account and public-read setups.

Mis à jour le

Permissions

Conditions

Policy JSON
Apply it with the AWS CLI

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : AWS IAM Policy Generator

  1. Choose IAM policy to attach to a user or role, or S3 bucket policy to attach to a bucket.
  2. Enter your account ID and region so the ARNs are complete.
  3. Add one permission per service with + Add permission: pick the access level (read, write, full) and the resource name — a bucket, table, queue, function or secret. Remove one with ×.
  4. Tick conditions such as Require MFA or HTTPS only, then copy the JSON or the AWS CLI command. Fix anything flagged in the warnings first.

Least privilege in practice

An IAM policy is a list of statements: an Effect (Allow or Deny), the Actions it covers and the Resources they apply to, optionally with Conditions. Least privilege means granting only the actions a workload really uses, on only the resources it needs — so a leaked key can’t delete your database or read every bucket.

  • Avoid "Action": "*" and "Resource": "*"; the generator warns when a statement uses them.
  • S3 needs two resource forms: arn:aws:s3:::bucket for ListBucket and arn:aws:s3:::bucket/* for objects — the generator splits them automatically.
  • A few actions only work on *, such as ecr:GetAuthorizationToken; those get their own statement.

Bucket policies

A bucket policy is attached to the bucket and names a Principal — another account, a role, CloudFront or everyone. The recommended setup for websites is a private bucket that only CloudFront with Origin Access Control can read, plus a statement that denies plain-HTTP requests. Public read needs S3 Block Public Access turned off, so only use it for truly public files.

Test policies before production with the IAM policy simulator, and review access with IAM Access Analyzer. Related: Kubernetes YAML Generator, CORS Header Generator.

Aussi recherché comme : iam policy generator, aws policy generator, s3 bucket policy generator, least privilege iam policy, iam policy json, aws iam policy example, dynamodb iam policy, lambda iam policy.

Outils complémentaires : AWS IAM Policy Generator

  • GitLab CI Generator — Pick your stack and get a working .gitlab-ci.yml: install with caching, lint and test jobs, a build with artifacts, a Docker image pushed to the GitLab registry, or a GitLab Pages deploy — with rules that run pipelines for merge requests and your default branch without duplicates.
  • Générateur de workflows GitHub Actions — Choisissez votre pile, vos déclencheurs et vos étapes, puis obtenez un script commenté .github/workflows/ci.yml — installation, mise en cache, analyse syntaxique, test, compilation, une matrice de versions et, en option, un déploiement vers GitHub Pages, Vercel ou un registre de conteneurs.
  • Formateur JSON — Collez votre code JSON pour le formater, le compresser ou le valider.
  • YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.

Questions fréquentes

How do I give a Lambda function access to one S3 bucket?
Add an S3 permission with Read (or Read and write) and the bucket name, plus a CloudWatch Logs write permission for its logs. Attach the policy to the function’s execution role.
Why does s3:ListBucket need a different resource?
ListBucket acts on the bucket itself (arn:aws:s3:::bucket), while GetObject and PutObject act on objects (arn:aws:s3:::bucket/*). The generator writes both automatically.
What is the difference between an IAM policy and a bucket policy?
An IAM policy is attached to a user, group or role and says what they may do. A bucket policy is attached to a bucket and says who may use it — including other accounts and AWS services like CloudFront.
Is a generated policy safe to use as is?
It is a least-privilege starting point. Check the resource names, keep the warnings in mind and test it with the IAM policy simulator before using it in production.
Puis-je installer AWS IAM Policy Generator en tant qu’application web et l’utiliser hors ligne ?
Oui. AWS IAM Policy Generator est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires