This section contains information on how to make requests to Amazon S3 endpoints by using the REST API. For a list of Amazon S3 endpoints, see Regions and Endpoints in the AWS General Reference.
Constructing S3 hostnames for REST API requestsAmazon S3 endpoints follow the structure shown below:
s3.Region
.amazonaws.com
Amazon S3 access points endpoints and dual-stack endpoints also follow the standard structure:
Amazon S3 access points âs3-accesspoint.
Region
.amazonaws.com
Dual-stack â s3.dualstack.
Region
.amazonaws.com
For a complete list of Amazon S3 Regions and endpoints, see Amazon S3 endpoints and quotas in the Amazon Web Services General Reference.
Virtual hostedâstyle and pathâstyle requestsWhen making requests by using the REST API, you can use virtual hostedâstyle or path-style URIs for the Amazon S3 endpoints. For more information, see Path-style requests .
Example Virtual hostedâStyle requestFollowing is an example of a virtual hostedâstyle request to delete the puppy.jpg
file from the bucket named examplebucket
in the US West (Oregon) Region. For more information about virtual hosted-style requests, see Path-style requests .
DELETE /puppy.jpg HTTP/1.1
Host: examplebucket.s3.us-west-2.amazonaws.com
Date: Mon, 11 Apr 2016 12:00:00 GMT
x-amz-date: Mon, 11 Apr 2016 12:00:00 GMT
Authorization: authorization string
Example Path-style request
Following is an example of a path-style version of the same request.
DELETE /examplebucket/puppy.jpg HTTP/1.1
Host: s3.us-west-2.amazonaws.com
Date: Mon, 11 Apr 2016 12:00:00 GMT
x-amz-date: Mon, 11 Apr 2016 12:00:00 GMT
Authorization: authorization string
You will receive an HTTP response code 307 Temporary Redirect error and a message indicating what the correct URI is for your resource if you try to access a bucket outside the US East (N. Virginia) region with path-style syntax that uses either of the following:
For more information about path-style requests, see Path-style requests .
ImportantUpdate (September 23, 2020) â To make sure that customers have the time that they need to transition to virtual-hostedâstyle URLs, we have decided to delay the deprecation of path-style URLs. For more information, see Amazon S3 Path Deprecation Plan â The Rest of the Story in the AWS News Blog.
Making requests to dual-stack endpoints by using the REST APIWhen using the REST API, you can directly access a dual-stack endpoint by using a virtual hostedâstyle or a path style endpoint name (URI). All Amazon S3 dual-stack endpoint names include the region in the name. Unlike the standard IPv4-only endpoints, both virtual hostedâstyle and a path-style endpoints use region-specific endpoint names.
Example Virtual hostedâStyle dual-stack endpoint requestYou can use a virtual hostedâstyle endpoint in your REST request as shown in the following example that retrieves the puppy.jpg
object from the bucket named examplebucket
in the US West (Oregon) Region.
GET /puppy.jpg HTTP/1.1
Host: examplebucket.s3.dualstack.us-west-2.amazonaws.com
Date: Mon, 11 Apr 2016 12:00:00 GMT
x-amz-date: Mon, 11 Apr 2016 12:00:00 GMT
Authorization: authorization string
Example Path-style dual-stack endpoint request
Or you can use a path-style endpoint in your request as shown in the following example.
GET /examplebucket/puppy.jpg HTTP/1.1
Host: s3.dualstack.us-west-2.amazonaws.com
Date: Mon, 11 Apr 2016 12:00:00 GMT
x-amz-date: Mon, 11 Apr 2016 12:00:00 GMT
Authorization: authorization string
For more information about dual-stack endpoints, see Using Amazon S3 dual-stack endpoints.
For more information about making requests using the REST API, see the topics below.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4