Amazon Simple Storage Service API Reference API Version 2006-03-01 Amazon Simple Storage Service API Reference
Total Page:16
File Type:pdf, Size:1020Kb
Amazon Simple Storage Service API Reference API Version 2006-03-01 Amazon Simple Storage Service API Reference Amazon Simple Storage Service: API Reference Copyright © 2014 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The following are trademarks of Amazon Web Services, Inc.: Amazon, Amazon Web Services Design, AWS, Amazon CloudFront, Cloudfront, Amazon DevPay, DynamoDB, ElastiCache, Amazon EC2, Amazon Elastic Compute Cloud, Amazon Glacier, Kindle, Kindle Fire, AWS Marketplace Design, Mechanical Turk, Amazon Redshift, Amazon Route 53, Amazon S3, Amazon VPC. In addition, Amazon.com graphics, logos, page headers, button icons, scripts, and service names are trademarks, or trade dress of Amazon in the U.S. and/or other countries. Amazon©s trademarks and trade dress may not be used in connection with any product or service that is not Amazon©s, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Simple Storage Service API Reference 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 PUT Bucket requestPayment ....................................................................................... 185 PUT Bucket versioning ................................................................................................ 187 PUT Bucket website ................................................................................................... 191 Operations on Objects ........................................................................................................ 198 DELETE Object ......................................................................................................... 200 Delete Multiple Objects ............................................................................................... 203 GET Object ............................................................................................................... 212 GET Object ACL ........................................................................................................ 222 GET Object torrent ..................................................................................................... 226 HEAD Object ............................................................................................................ 228 OPTIONS object ........................................................................................................ 235 POST Object ............................................................................................................