Skip to main content
Private S3-compatible buckets — from Amazon or Gcore — can be used as a CDN resource origin. CDN servers authenticate with each bucket using AWS Signature V4, which requires an Access Key ID, Secret Access Key, Hostname, and Region. Origin groups support multiple origins with individual authentication settings per origin, and an optional Host header override per origin.

Authentication data

The required authentication data is available in the S3 storage account.
All essential keys are in the Managing access keys guide from Amazon.

Configure a private bucket as an origin

An origin group can be configured either during CDN resource creation or in advance from the Origin groups tab. The steps below cover CDN resource creation. When creating a group from the Origin groups tab directly, the process is the same starting from step 2.1. Go to the CDN resource creation page and select the Specify content origin option in the Origin section.2. Click Add origin to add an origin to the group. For each origin added, configure the following:a. Select the S3 storage tab.b. Select the type of S3 storage: Amazon or Other.c. Specify the authentication data for the selected storage type:
  • For Amazon: Access Key ID, Secret access key, and AWS region
  • For Other: Hostname (including the bucket prefix), Access Key ID, Secret access key, and Region
TipTo determine the region of a Gcore Object Storage bucket, use the S3 service URLs and default region names guide.
d. Enter the Bucket name.e. Optional: enter the storage hostname in the Host header override field for this origin. When left empty, the Host header configured in the resource settings applies to all origins. When set, it overrides the global value for this specific origin — required when multiple origins point to different buckets that each need a unique hostname.The Host header format depends on the storage provider:
  • For Gcore Object Storage: {bucket-name}.s-ed1.cloud.gcore.lu
  • For most other providers (including Amazon): {bucket-name}.s3.{region-code}.{storage-hostname}
Specifying the bucket in the Host header restricts CDN access to that bucket only, preventing unintended access to other data in the storage account.
In the example below, the origin group uses a private bucket test-private in Gcore Object Storage with the endpoint s-ed1.cloud.gcore.lu:
Origin group form with S3 storage tab selected, showing S3 type, Access Key ID, Secret access key, AWS region, Bucket name, and Host header override fields
3. To add more origins to the group, click + Add origin again and repeat step 2 for each one. Each origin can have different credentials and a separate Host header override.4. Continue the CDN resource creation according to the Create CDN resource for static assets only guide.5. If the per-origin Host header override is not used, go to the resource settings and open the Host header option in the HTTP headers section. Enter the storage hostname in the format shown in step 2e above, then click Save changes.
Save changes

Troubleshooting Amazon S3 (403 Forbidden for HEAD requests)

Private Amazon S3 buckets used as an origin can return a 403 Forbidden error for HEAD requests while GET requests succeed with 200 OK. This discrepancy typically has one of four causes:
  1. Restricted object-level permissions: The bucket or IAM policy permits public read access, but the object’s Access Control List (ACL) denies access to the IAM user or role — AWS S3 returns 403 for HEAD in this case.
  2. Different policies in effect: The IAM identity making the HEAD request lacks s3:GetObjectAttributes or equivalent metadata-read permissions, causing AWS S3 to return 403 for HEAD while GET succeeds under a broader policy.
  3. Incorrect parameters in presigned URLs: A presigned URL generated with mismatched parameters (access key, secret access key, bucket name, or object key) causes AWS to return 403. The parameters must be consistent for both HEAD and GET requests.
  4. Different owners for bucket and object: When the bucket and object belong to different AWS accounts and the object owner hasn’t granted the necessary permissions to the bucket owner, AWS returns 403 for HEAD and 200 for GET.
To resolve the issue, modify the bucket policy, IAM permissions, or the object’s ACL as required.