0% found this document useful (0 votes)
22 views5 pages

Website Endpoints - Amazon Simple Storage Service

Website endpoints - Amazon Simple Storage Service

Uploaded by

Brubaker Brubake
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Website Endpoints - Amazon Simple Storage Service

Website endpoints - Amazon Simple Storage Service

Uploaded by

Brubaker Brubake
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

28/6/24, 22:04 Website endpoints - Amazon Simple Storage Service

AWS Documentation Amazon Simple Storage Service (S3) User Guide

Esta página no se ha traducido a su idioma. Solicitar


traducción

Website endpoints
PDF (/pdfs/AmazonS3/latest/userguide/s3- RSS (s3-userguide-rss-
userguide.pdf#WebsiteEndpoints) updates.rss)

When you configure your bucket as a static website, the website is


available at the AWS Region-specific website endpoint of the bucket.
Website endpoints are different from the endpoints where you send REST
API requests. For more information about the differences between the
endpoints, see Key differences between a website endpoint and a REST
API endpoint (#WebsiteRestEndpointDiff) .

Depending on your Region, your Amazon S3 website endpoint follows one


of these two formats.

s3-website dash (-) Region ‐ http:// bucket-name .s3-website-


Region .amazonaws.com
s3-website dot (.) Region ‐ http:// bucket-name .s3-
website. Region .amazonaws.com

These URLs return the default index document that you configure for the
website. For a complete list of Amazon S3 website endpoints, see Amazon
S3 Website Endpoints
(https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_end
points) .

Note
To augment the security of your Amazon S3 static websites, the
Amazon S3 website endpoint domains (for example, s3-website-
us-east-1.amazonaws.com or s3-website.ap-south-
1.amazonaws.com) are registered in the Public Suffix List (PSL)
(https://publicsuffix.org/) . For further security, we recommend

https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html 1/5
28/6/24, 22:04 Website endpoints - Amazon Simple Storage Service

that you use cookies with a __Host- prefix if you ever need to
set sensitive cookies in the domain name for your Amazon S3
static websites. This practice will help to defend your domain
against cross-site request forgery attempts (CSRF). For more
information see the Set-Cookie
(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-
Cookie#cookie_prefixes) page in the Mozilla Developer Network.

If you want your website to be public, you must make all your content
publicly readable for your customers to be able to access it at the website
endpoint. For more information, see Setting permissions for website
access (./WebsiteAccessPermissionsReqd.html) .

Important
Amazon S3 website endpoints do not support HTTPS or access
points. If you want to use HTTPS, you can use Amazon
CloudFront to serve a static website hosted on Amazon S3. For
more information, see How do I use CloudFront to serve HTTPS
requests for my Amazon S3 bucket?
(https://aws.amazon.com/premiumsupport/knowledge-
center/cloudfront-https-requests-s3) To use HTTPS with a custom
domain, see Configuring a static website using a custom domain
registered with Route 53
(https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-
hosting-custom-domain-walkthrough.html) .

Requester Pays buckets do not allow access through a website


endpoint. Any request to such a bucket receives a 403 Access
Denied response. For more information, see Using Requester
Pays buckets for storage transfers and usage
(./RequesterPaysBuckets.html) .

Topics

Website endpoint examples (#website-endpoint-examples)


Adding a DNS CNAME (#website-endpoint-dns-cname)
Using a custom domain with Route 53 (#custom-domain-s3-endpoint)
Key differences between a website endpoint and a REST API endpoint
(#WebsiteRestEndpointDiff)

https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html 2/5
28/6/24, 22:04 Website endpoints - Amazon Simple Storage Service

Website endpoint examples


The following examples show how you can access an Amazon S3 bucket
that is configured as a static website.

Example — Requesting an object at the root level

To request a specific object that is stored at the root level in the bucket,
use the following URL structure.

http://bucket-name.s3-
website.Region.amazonaws.com/object-name

For example, the following URL requests the photo.jpg object that is
stored at the root level in the bucket.

http://example-bucket.s3-website.us-west-
2.amazonaws.com/photo.jpg

Example — Requesting an object in a prefix

To request an object that is stored in a folder in your bucket, use this URL
structure.

http://bucket-name.s3-
website.Region.amazonaws.com/folder-name/object-name

The following URL requests the docs/doc1.html object in your bucket.

http://example-bucket.s3-website.us-west-
2.amazonaws.com/docs/doc1.html

Adding a DNS CNAME


If you have a registered domain, you can add a DNS CNAME entry to point
to the Amazon S3 website endpoint. For example, if you registered the
domain www.example-bucket.com , you could create a bucket
www.example-bucket.com , and add a DNS CNAME record that points to

https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html 3/5
28/6/24, 22:04 Website endpoints - Amazon Simple Storage Service

www.example-bucket.com.s3-website. Region .amazonaws.com . All


requests to http://www.example-bucket.com are routed to
www.example-bucket.com.s3-website. Region .amazonaws.com .

For more information, see Customizing Amazon S3 URLs with CNAME


records (./VirtualHosting.html#VirtualHostingCustomURLs) .

Using a custom domain with Route 53


Instead of accessing the website using an Amazon S3 website endpoint,
you can use your own domain registered with Amazon Route 53 to serve
your content—for example, example.com . You can use Amazon S3 with
Route 53 to host a website at the root domain. For example, if you have
the root domain example.com and you host your website on Amazon S3,
your website visitors can access the site from their browser by entering
either http://www.example.com or http://example.com .

For an example walkthrough, see Tutorial: Configuring a static website


using a custom domain registered with Route 53 (./website-hosting-custom-
domain-walkthrough.html) .

Key differences between a website endpoint


and a REST API endpoint
An Amazon S3 website endpoint is optimized for access from a web
browser. The following table summarizes the key differences between a
REST API endpoint and a website endpoint.

Key difference REST API Website endpoint


endpoint

Access control Supports both Supports only publicly


public and readable content
private
content

Error message Returns an Returns an HTML


handling XML- document
formatted
error response

https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html 4/5
28/6/24, 22:04 Website endpoints - Amazon Simple Storage Service

Key difference REST API Website endpoint


endpoint

Redirection Not applicable Supports both object-


support level and bucket-level
redirects

Requests Supports all Supports only GET and


supported bucket and HEAD requests on
object objects
operations

Responses to GET Returns a list Returns the index


and HEAD requests of the object document that is
at the root of a keys in the specified in the
bucket bucket website configuration

Secure Sockets Supports SSL Does not support SSL


Layer (SSL) connections connections
support

For a complete list of Amazon S3 endpoints, see Amazon S3 endpoints


and quotas (https://docs.aws.amazon.com/general/latest/gr/s3.html) in the
AWS General Reference.

© 2024, Amazon Web Services, Inc o sus afiliados. Todos los derechos reservados.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteEndpoints.html 5/5

You might also like