Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the HeadBucket operation in Amazon S3

I have been looking at the usage reports from Amazons S3 service and noticed that there is a DataTransfer-out-bytes charge for GetObject operations (ok i understand this one) and also a DataTransfer-out-bytes charge for HeadBucket operations.

What is HeadBucket, when is this request made?

cheers

like image 549
undefined Avatar asked Apr 23 '09 13:04

undefined


People also ask

What are ACLS in S3?

An S3 ACL is a sub-resource that's attached to every S3 bucket and object. It defines which AWS accounts or groups are granted access and the type of access. When you create a bucket or an object, Amazon S3 creates a default ACL that grants the resource owner full control over the resource.

How does replication work in S3?

S3 Replication supports two-way replication between two or more buckets in the same or different AWS Regions. While live replication like CRR and SRR automatically replicates newly uploaded objects as they are written to your bucket, S3 Batch Replication allows you to replicate existing objects.

How do I prevent accidental deletion of S3?

To prevent or mitigate future accidental deletions, consider the following features: Enable versioning to keep historical versions of an object. Enable Cross-Region Replication of objects. Enable MFA delete to require multi-factor authentication (MFA) when deleting an object version.

What is Getobject in AWS S3?

The S3 object data source allows access to the metadata and optionally (see below) content of an object stored inside S3 bucket.


1 Answers

That's a HEAD request to a bucket:

HEAD /my-s3-bucket

Which will basically just tell you that a bucket exists (200 OK), or not (404 Not Found).

For Example:

# curl -v -X HEAD http://s3.amazonaws.com/fooXXXX

* About to connect() to s3.amazonaws.com port 80 (#0)
*   Trying 72.21.211.144... connected
* Connected to s3.amazonaws.com (72.21.211.144) port 80 (#0)
> HEAD /fooXXXX HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
> Host: s3.amazonaws.com
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< x-amz-request-id: A21BF750F080A267
< x-amz-id-2: SPQ7yX6Ln0Zgp0YULT/64ag9077nNnN25jH8PMLGMm/SbXPZ+FF3qFuiOyBfiktP
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Thu, 23 Apr 2009 13:39:50 GMT
< Server: AmazonS3

Vs.

# curl -v -X HEAD http://s3.amazonaws.com/s3hub

* About to connect() to s3.amazonaws.com port 80 (#0)
*   Trying 72.21.207.135... connected
* Connected to s3.amazonaws.com (72.21.207.135) port 80 (#0)
> HEAD /s3hub HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
> Host: s3.amazonaws.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< x-amz-id-2: E6OvrEMD35HpJjlBg0kB90H/uaQDX8qk0oXb+baOtDKIoMXmNwgIRSX2rDE5Urlb
< x-amz-request-id: DAAAA11524A4A557
< Date: Thu, 23 Apr 2009 13:43:01 GMT
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Server: AmazonS3
< 
like image 159
Mark Renouf Avatar answered Oct 06 '22 00:10

Mark Renouf