AWS,  S3

S3 REST API – HTTP/1.1 Requests for Uploading Files

Let’s review major REST API requests for uploading files to S3 (PutObject, CreateMultipartUpload, UploadPart and CompleteMultipartUpload) that you can observe in S3 access logs.

This can be helpful for monitoring S3 write performance. See also S3 Multipart Upload – S3 Access Log Messages.

PutObject – REST.PUT.OBJECT Operation

PutObject API call uploads a single file to S3. Its HTTP/1.1 method and request URI for loading a file into sales/data.gz key:

PUT /sales/data.gz HTTP/1.1

Corresponding S3 access log message:

operation	 key	         method    request uri
---------	 ---             ------    -----------
REST.PUT.OBJECT	 sales/data.gz   PUT       /sales/data.gz

CreateMultipartUpload – REST.POST.UPLOADS Operation

CreateMultipartUpload API call initiates a multipart upload to S3. Note that when a multipart upload of a file completes, the file creation timestamp will be the timestamp of CreateMultipartUpload call, not the end of the upload (i.e. not the time when the file becomes visible for readers).

HTTP/1.1 method and request URI for initiating a multipart upload into sales/data.gz key:

POST /sales/data.gz?uploads HTTP/1.1

Corresponding S3 access log message:

operation	   key	          method    request uri
---------	   ---            ------    -----------
REST.POST.UPLOADS  sales/data.gz  POST      /sales/data.gz?uploads

UploadPart – REST.PUT.PART Operation

UploadPart API call uploads a part in a multipart upload. Its HTTP/1.1 method and request URI for loading Part 1 into sales/data.gz key:

PUT /sales/data.gz?uploadId=Alnpp...WtcIUudg--&partNumber=1 HTTP/1.1

Corresponding S3 access log message:

operation      key	      method    request uri
---------      ---            ------    -----------
REST.PUT.PART  sales/data.gz  PUT       /sales/data.gz?uploadId=Alnpp...WtcIUudg--&partNumber=1

CompleteMultipartUpload – REST.POST.UPLOAD Operation

CompleteMultipartUpload API call completes a multipart upload by assembling previously uploaded parts. Its HTTP/1.1 method and request URI for completing upload to sales/data.gz key:

POST /sales/data.gz?uploadId=Alnpp...WtcIUudg-- HTTP/1.1

Corresponding S3 access log message:

operation         key	         method    request uri
---------         ---            ------    -----------
REST.POST.UPLOAD  sales/data.gz  POST      /sales/data.gz?uploadId=Alnpp...WtcIUudg--