Setting up Bucket Access
Select Access Control List from the Permissions tab for the bucket
- Select Everyone and enable List Objects to grant public access to only view objects
Setting Up the CDN
This example uses a bucket named
stackpathtesting within the
us-east-2 region, please replace any instance of
stackpathtesting or <bucketname> with the actual name of your bucket and any instance of
us-east-2 or <aws-region> with the actual region for your bucket.
Log in to StackPath
- Create a new Site
Enter the Domain Name for the site being created.
- Set the Bucket URL to
s3.<aws-region>.amazonaws.com/<bucketname>. Set Origin Authentication if the bucket has been configured as such, or leave None if no authentication is required.
View the newly created Site and select the Settings tab to confirm the Host Header
- Now, confirm the Host Header is set as
s3.<aws-region>.amazonaws.comif you used
Test the Edge Address by visiting it with the browser. This should produce an XML File that contains an index of all of the objects within the bucket. Once this is confirmed, you can now serve your bucket objects over the CDN Cache using
http://cdn.url/path/to/bucket/object (And replacing cdn.url with the Edge Address was generated upon creating the Site)
Connecting the StackPath CDN can be useful for