원본 액세스 섹션에서 공개를 선택합니다. 이렇게 해도 버킷은 공개되지 않습니다. 대신에, 액세스 메커니즘을 구성해서는 안 된다는 것을 CloudFront에 알립니다.
캐시 키 및 원본 요청 섹션에서 다음을 수행하세요.
캐시 정책에서 CachingDisabled를 선택합니다. 이렇게 하면 CloudFront가 요청을 캐시하여 인증되지 않은 뷰어에 제공하는 것을 방지합니다.
원본 요청 정책에는 AllViewerExceptHostHeader를 선택합니다. 이렇게 하면 CloudFront에서 인증 헤더를 S3로 전달할 수 있으므로 Storage Transfer Service가 보안용 사용자 인증 정보로 버킷에 액세스할 수 있습니다.
웹 애플리케이션 방화벽(WAF) 섹션에서는 사용 설정하지 않음을 선택합니다.
필요한 경우 가격 클래스를 선택하세요. Storage Transfer Service는 소스 버킷의 리전을 기준으로 작업자 풀을 선택하므로 해당 리전에서 책정된 CloudFront 가격이 적용됩니다. 최저가를 얻으려면 소스 버킷이 US 또는 유럽에 존재하도록 하거나, CloudFront에서 가격 책정 클래스로 북미 및 유럽만 사용을 선택하세요.
CloudFront 배포 만들기를 클릭합니다.
CloudFront 배포가 성공적으로 생성되면 CloudFront 배포 세부정보 페이지가 표시됩니다.
배포 도메인 이름을 기록해 둡니다. 예를 들면 https://dy1h2n3l4ob56.cloudfront.net입니다. 세부정보 페이지에서 배포 도메인 이름 앞에 https:// 프로토콜이 포함되어 있지 않으면 전송 작업을 만들 때 직접 추가해야 합니다.
전송 작업 만들기
CloudFront 배포를 통한 전송은 Google Cloud 콘솔 및 REST API에서 지원됩니다.
전송 작업 이름에 개인 식별 정보(PII) 또는 보안 데이터와 같은 민감한 정보를 포함하지 마세요. 리소스 이름은 다른 Google Cloud 리소스 이름으로 전파될 수 있으며 프로젝트 외부의 Google 내부 시스템에 노출될 수 있습니다.
CloudFront 도메인을 입력하라는 메시지가 표시되면 이전 섹션에서 기록한 배포 도메인 이름을 입력합니다. 이 값은 Amazon Web Services 콘솔의 CloudFront 섹션에도 표시됩니다. 형식은 https://dy1h2n3l4ob56.cloudfront.net입니다.
사용자가 직접 또는 CloudFront를 통해 (버킷이 비공개인 경우) 객체에 액세스하려고 하면 permission denied 오류가 발생합니다.
Storage Transfer Service는 전송 작업에서 제공한 사용자 인증 정보를 사용하여 CloudFront에 대한 요청에 서명하므로 Google은 S3에서 직접 다운로드하는 것처럼 객체를 안전하게 다운로드할 수 있게 해줍니다. 이는 헤더 전달 설정 AllViewerExceptHostHeader로 인해 작동합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(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`."]]