Bei der Datenübertragung über CloudFront können niedrigere AWS-Kosten für ausgehenden Traffic anfallen als bei der direkten Übertragung von S3. Weitere Informationen finden Sie unter CloudFront-Preise und S3-Ausgabegebühren.
CloudFront-Distribution für Ihren S3-Bucket erstellen
Rufen Sie in Ihrem AWS-Konto CloudFront auf.
Klicken Sie auf CloudFront-Distribution erstellen.
Wählen Sie unter Herkunftsdomain Ihren S3-Bucket aus.
Das Feld Ursprungspfad muss leer bleiben.
Übernehmen Sie den automatisch ausgefüllten Ursprungsnamen oder geben Sie einen eigenen Wert an.
Wählen Sie im Bereich Zugriff auf Ursprung die Option Öffentlich aus. Dadurch wird Ihr Bucket nicht öffentlich. Stattdessen wird CloudFront mitgeteilt, dass kein Zugriffsmechanismus konfiguriert werden soll.
Im Abschnitt Cache-Schlüssel und Ursprungsanfragen:
Wählen Sie als Cache-RichtlinieCachingDisabled aus. Dadurch wird verhindert, dass CloudFront Anfragen im Cache speichert und an nicht authentifizierte Zuschauer weiterleitet.
Wähle für Richtlinie für Ursprungsanfragen die Option Alle Betrachter außer Hostheader aus. So kann CloudFront Authentifizierungsheader an S3 weiterleiten, damit der Storage Transfer Service mit Ihren sicheren Anmeldedaten auf Ihren Bucket zugreifen kann.
Wählen Sie im Bereich Web Application Firewall (WAF) die Option Nicht aktivieren aus.
Optional können Sie eine Preisklasse auswählen. Der Storage Transfer Service wählt Worker-Pools basierend auf der Region des Quell-Buckets aus. Die CloudFront-Preise gelten daher für diese Region. Um die niedrigsten Preise zu erhalten, muss sich Ihr Quell-Bucket entweder in den USA oder in Europa befinden oder Sie müssen in CloudFront Nur Nordamerika und Europa verwenden als Preisklasse auswählen.
Klicken Sie auf CloudFront-Distribution erstellen.
Nach der erfolgreichen Erstellung wird die Seite mit den Details zur CloudFront-Bereitstellung angezeigt.
Notieren Sie sich den Distributionsdomainnamen. Beispiel: https://dy1h2n3l4ob56.cloudfront.net. Wenn auf der Seite mit den Details das https://-Protokoll nicht vor dem Namen der Distributionsdomain steht, müssen Sie es beim Erstellen des Übertragungsjobs selbst hinzufügen.
Übertragungsjob erstellen
Die Übertragung über eine CloudFront-Distribution wird in der Google Cloud Console und in der REST API unterstützt.
Der Name des Übertragungsjobs darf keine vertraulichen Informationen wie personenidentifizierbare Informationen oder Sicherheitsdaten enthalten. Ressourcennamen können an die Namen anderer Google Cloud Ressourcen weitergegeben und für interne Google-Systeme außerhalb Ihres Projekts freigegeben werden.
Google Cloud console
Wenn Sie eine Übertragung mit der Google Cloud Console erstellen möchten, folgen Sie der Anleitung zum Erstellen einer Übertragung.
Wenn Sie aufgefordert werden, die CloudFront-Domain einzugeben, geben Sie den Domainnamen der Distribution ein, den Sie im vorherigen Abschnitt notiert haben. Sie finden diesen Wert auch im Abschnitt „CloudFront“ der Amazon Web Services-Konsole. Sie hat das Format https://dy1h2n3l4ob56.cloudfront.net.
REST API
Wenn Sie eine Übertragung mit der REST API erstellen möchten, folgen Sie dem Beispiel auf der Seite Übertragungen erstellen.
Geben Sie den Domainnamen der Verteilung als Wert für das Feld transferSpec.awsS3DataSource.cloudfrontDomain an:
Werden meine Objekte durch die Verwendung von CloudFront der Öffentlichkeit zugänglich gemacht?
Nein. Wenn Sie die Konfigurationsschritte auf dieser Seite ausgeführt haben, sind Ihre Objekte nicht öffentlich zugänglich.
Cloudfront hat keinen direkten Zugriff auf Ihre S3-Objekte.
Nutzer erhalten den Fehler permission denied, wenn sie versuchen, direkt oder über CloudFront auf Ihre Objekte zuzugreifen (wenn Ihr Bucket privat ist).
Der Storage Transfer Service signiert Anfragen an CloudFront mit den Anmeldedaten, die Sie im Übertragungsjob angegeben haben. So können wir Ihre Objekte genauso sicher herunterladen, als würden wir sie direkt aus S3 herunterladen. Das funktioniert dank der Einstellung für die Weiterleitung von Headern AllViewerExceptHostHeader.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[],[],null,["# Transfer from S3 via CloudFront\n\nTransfers from Amazon S3 can use an\n[Amazon CloudFront](https://aws.amazon.com/cloudfront/) distribution as an\negress path.\n\nData transfers through CloudFront may benefit from lower AWS egress costs\ncompared to transferring directly from S3. See\n[CloudFront pricing](https://aws.amazon.com/cloudfront/pricing/) and\n[S3 egress charges](https://aws.amazon.com/s3/pricing/) for details.\n\nUsing CloudFront as the egress path does not expose your S3 objects to the\npublic. See\n[Does using CloudFront expose my objects to the public?](#does_cloudfront_expose_objects)\n\nOverview\n--------\n\nIn order to transfer S3 data through CloudFront, you must follow these steps:\n\n- [Configure IAM permissions](#iam)\n- [Configure access to your S3 bucket](#s3-access)\n- [Create a CloudFront distribution for your S3 bucket](#create-cf)\n- [Create a transfer job](#create-job)\n\nConfigure IAM permissions\n-------------------------\n\nFollow the instructions in\n[Agentless transfer permissions](/storage-transfer/docs/iam-cloud) to grant the\nrequired Google Cloud permissions.\n\nConfigure access to your S3 bucket\n----------------------------------\n\nFollow the instructions in\n[Configure access to a source: Amazon S3](/storage-transfer/docs/source-amazon-s3)\nto configure access to your data in Amazon S3.\n\nCreate a CloudFront distribution for your S3 bucket\n---------------------------------------------------\n\n1. In your AWS account, go to **CloudFront**.\n2. Click **Create a CloudFront distribution**.\n3. Under **Origin domain** select your S3 bucket.\n4. **Origin path** must be left empty.\n5. Accept the auto-filled **Origin name** or specify your own value.\n6. In the **Origin access** section, select *Public*. This does not make your bucket public; instead it indicates to CloudFront that no access mechanism should be configured.\n7. In the **Cache key and origin requests** section:\n 1. For **Cache policy** select *CachingDisabled*. This prevents CloudFront from caching requests and serving them to unauthenticated viewers.\n 2. For **Origin request policy** select *AllViewerExceptHostHeader*. This allows CloudFront to forward authentication headers to S3, so that Storage Transfer Service can access your bucket with your secure credentials.\n8. In the **Web Application Firewall (WAF)** section, select *Do not enable*.\n9. Optionally, choose a **Price class** . Storage Transfer Service selects worker pools based on the source bucket's region, so CloudFront pricing is incurred in that region. To obtain the lowest pricing, either ensure that your source bucket is in the US or Europe, or select *Use only North America and Europe* as the **Price class** in CloudFront.\n10. Click **Create CloudFront distribution**.\n\n Once successfully created, the CloudFront distribution details page is\n displayed.\n11. Note the **Distribution domain name** . For example:\n `https://dy1h2n3l4ob56.cloudfront.net`. If the details page doesn't include\n the `https://` protocol in front of the distribution domain name, you'll need\n to add it yourself when creating the transfer job.\n\nCreate a transfer job\n---------------------\n\nTransferring via a CloudFront distribution is supported in the Google Cloud console\nand the REST API.\nDon't include sensitive information such as personally identifiable information (PII) or security data in your transfer job name. Resource names may be propagated to the names of other Google Cloud resources and may be exposed to Google-internal systems outside of your project.\n\n\u003cbr /\u003e\n\n### Google Cloud console\n\nTo create a transfer using a the Google Cloud console, follow the\ninstructions to\n[create a transfer](/storage-transfer/docs/create-transfers?tab=google-cloud-console#create_a_transfer).\n\nWhen prompted to enter the **CloudFront domain** , enter the distribution\ndomain name you noted in the previous section. You can also find this value\nlisted in the CloudFront section of the Amazon Web Services console. It has\nthe format `https://dy1h2n3l4ob56.cloudfront.net`.\n\n### REST API\n\nTo create a transfer using the REST API, follow the example on the\n[Create transfers](/storage-transfer/docs/create-transfers?tab=rest#s3-to-cloud)\npage.\n\nSpecify the distribution domain name as the value of the\n`transferSpec.awsS3DataSource.cloudfrontDomain` field: \n\n \"transferSpec\": {\n \"awsS3DataSource\": {\n \"bucketName\": \"AWS_SOURCE_NAME\",\n \"cloudfrontDomain\": \"https://dy1h2n3l4ob56.cloudfront.net\",\n \"awsAccessKey\": {\n \"accessKeyId\": \"AWS_ACCESS_KEY_ID\",\n \"secretAccessKey\": \"AWS_SECRET_ACCESS_KEY\"\n }\n },\n ...\n }\n\nFrequently asked questions\n--------------------------\n\n### Does using CloudFront expose my objects to the public?\n\nNo. If you've followed the configuration steps on this page, your objects are\nnot exposed to the public.\n\n- Cloudfront does not have direct access to your S3 objects.\n- Users receive a `permission denied` error if they try to access your objects either directly or through CloudFront (if your bucket is private).\n- Storage Transfer Service signs requests to CloudFront using the credentials you provided in the transfer job, which allows us to download your objects securely as if we were downloading directly from S3. This works due to the header forwarding setting `AllViewerExceptHostHeader`."]]