Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

S3 Bucket Policy Generator — CloudFront, Cross-Account & Public Read

Create a correct S3 bucket policy in seconds: let CloudFront read a private bucket with Origin Access Control, give another AWS account or an IAM role read or write access, deny plain HTTP, or make a static website publicly readable — with the exact ARNs and the AWS CLI command to apply it.

Aktualisiert am

Permissions

Conditions

Policy JSON
Apply it with the AWS CLI

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: S3 Bucket Policy Generator

  1. The page starts in S3 bucket policy mode. Enter the bucket name and your account ID.
  2. Keep Deny without HTTPS on, and tick who may access the bucket: CloudFront, another account, an IAM role or the public.
  3. Fill in the distribution ID, account ID or role ARN, and optionally limit access to a prefix.
  4. Copy the policy, or run the AWS CLI command to apply it.

The usual bucket policies

  • CloudFront (OAC): the bucket stays private; only your distribution may read it, checked with AWS:SourceArn.
  • Cross-account: the other account’s root principal (or a role in it) may read or write objects.
  • HTTPS only: a Deny statement for requests where aws:SecureTransport is false — a common compliance requirement.
  • Public read: Principal: "*" with s3:GetObject; needs Block Public Access off, so keep it to public website files.

For policies attached to users and roles, switch to IAM policy mode in the AWS IAM Policy Generator.

Auch gesucht als: s3 bucket policy example, cloudfront oac bucket policy, s3 public read policy, s3 cross account bucket policy, enforce https s3 bucket policy.

Passende Tools zu: S3 Bucket Policy Generator

  • CORS Header Generator & Tester — Seeing “has been blocked by CORS policy”?
  • Kubernetes YAML Generator — Fill in your app’s name, image and port and get production-ready Kubernetes YAML: a Deployment with probes, resource limits and a hardened security context, plus the Service, Ingress with TLS, ConfigMap, Secret and HorizontalPodAutoscaler you tick — in one file ready for kubectl apply.
  • JSON Formatierer — Füge JSON ein, um es zu formatieren, zu minifizieren oder zu prüfen.
  • Security Headers Checker — Grade a site’s HTTP security headers from A+ to F, see which are missing and why they matter, and copy ready-made config snippets for Nginx, Apache, Netlify, Vercel or Cloudflare.

Häufige Fragen

How do I let CloudFront read a private S3 bucket?
Create an Origin Access Control in CloudFront, then add a bucket policy that allows the cloudfront.amazonaws.com service principal to s3:GetObject, with an AWS:SourceArn condition for your distribution. Tick “Allow CloudFront” here.
How do I make an S3 bucket public?
Turn off Block Public Access for the bucket and add a policy that allows Principal "*" to s3:GetObject. Only do this for files that are meant to be public.
How do I enforce HTTPS on an S3 bucket?
Add a Deny statement for all principals and actions when aws:SecureTransport is false. The generator adds it by default.
Kann ich S3 Bucket Policy Generator als Web-App installieren und offline nutzen?
Ja. S3 Bucket Policy Generator ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools