Table of Contents
Welcome to Amazon S3 ................................................................................................................. 1
How Do I...? ......................................................................................................................... 1
Introduction .................................................................................................................................. 2
Error Responses ........................................................................................................................... 3
List of Error Codes ................................................................................................................. 3
REST Error Responses .......................................................................................................... 9
REST API .................................................................................................................................. 11
Common Request Headers ................................................................................................... 12
Common Response Headers ................................................................................................. 14
Authenticating Requests (AWS Signature Version 4) .................................................................. 15
Authentication Methods ................................................................................................ 16
Introduction to Signing Requests .................................................................................... 16
Using an Authorization Header ....................................................................................... 17
Using Query Parameters ............................................................................................... 38
Examples: Signature Calculations ................................................................................... 43
Authenticating HTTP POST Requests ............................................................................. 45
Amazon S3 Signature Version 4 Authentication Specific Policy Keys ..................................... 47
Browser-Based Uploads Using POST ..................................................................................... 51
Calculating a Signature ................................................................................................ 52
Creating HTML Forms ................................................................................................. 52
Creating a POST Policy ................................................................................................ 56
Upload Examples ........................................................................................................ 61
Additional Considerations .............................................................................................. 64
Operations on the Service ..................................................................................................... 65
GET Service ............................................................................................................... 65
Operations on Buckets .......................................................................................................... 68
DELETE Bucket .......................................................................................................... 69
DELETE Bucket cors .................................................................................................... 71
DELETE Bucket lifecycle ............................................................................................... 73
DELETE Bucket policy .................................................................................................. 75
DELETE Bucket tagging ............................................................................................... 77
DELETE Bucket website ............................................................................................... 79
GET Bucket (List Objects) ............................................................................................. 81
GET Bucket acl ........................................................................................................... 89
GET Bucket cors ......................................................................................................... 92
GET Bucket lifecycle .................................................................................................... 95
GET Bucket policy ...................................................................................................... 101
GET Bucket location ................................................................................................... 103
GET Bucket logging .................................................................................................... 105
GET Bucket notification ............................................................................................... 108
GET Bucket tagging ................................................................................................... 111
GET Bucket Object versions ........................................................................................ 114
GET Bucket requestPayment ....................................................................................... 126
GET Bucket versioning ................................................................................................ 128
GET Bucket website ................................................................................................... 131
HEAD Bucket ............................................................................................................ 133
List Multipart Uploads ................................................................................................. 135
PUT Bucket .............................................................................................................. 144
PUT Bucket acl .......................................................................................................... 150
PUT Bucket cors ........................................................................................................ 157
PUT Bucket lifecycle ................................................................................................... 162
PUT Bucket policy ...................................................................................................... 171
PUT Bucket logging .................................................................................................... 173
PUT Bucket notification ............................................................................................... 178
PUT Bucket tagging .................................................................................................... 182
API Version 2006-03-01
iii
Amazon Simple Storage Service API Reference