Amazon S3 upload – bytes transferred is larger than actual file size

amazon s3

I just uploaded FEDORA ISO image to S3 via Visual Studio AWS Explorer (not using encryption).

After upload completed status shows:

1,004,232,704 / 999,292,928 Bytes

Actual file size on local disc is 999,292,928 Bytes.

Why is the first number larger than second?

Best Answer

Each packet of data has metadata sent with it, which increases the amount of data sent. The first number includes the size of your file plus the size of the metadata and is the number of bytes actually sent. The second only counts the number of data bytes.

For example, say the protocol used to send the file was HTTP. An HTTP request might look like this:

POST /file/upload
Content-Type: application/octate-stream
Authorization: abcxyz==
Content-Length: 5514587
User-Agent:  AWS uploader

<binary data here>

The top lines are HTTP headers, the metadata I referred to required for HTTP to work. Your file would have been made up of a number of requests containing a chunk of the file.