Menu
Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

HEAD Bucket

Description

This operation is useful to determine if a bucket exists and you have permission to access it. The operation returns a 200 OK if the bucket exists and you have permission to access it. Otherwise, the operation might return responses such as 404 Not Found and 403 Forbidden.  

For information about permissions required for this bucket operation, go to Specifying Permissions in a Policy in the Amazon Simple Storage Service Developer Guide.

Requests

Syntax

HEAD / HTTP/1.1 Host: BucketName.s3.amazonaws.com Date: date Authorization: authorization string (see Authenticating Requests (AWS Signature Version 4))

Request Parameters

This implementation of the operation does not use request parameters.

Request Elements

This implementation of the operation does not use request elements.

Request Headers

This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.

Responses

Response Headers

This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.

Response Elements

This implementation of the operation does not return response elements.

Special Errors

This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.

Examples

Sample Request

HEAD / HTTP/1.1 Date: Fri, 10 Feb 2012 21:34:55 GMT Authorization: authorization string Host: myawsbucket.s3.amazonaws.com Connection: Keep-Alive

Sample Response

HTTP/1.1 200 OK x-amz-id-2: JuKZqmXuiwFeDQxhD7M8KtsKobSzWA1QEjLbTMTagkKdBX2z7Il/jGhDeJ3j6s80 x-amz-request-id: 32FE2CEB32F5EE25 Date: Fri, 10 2012 21:34:56 GMT Server: AmazonS3