aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

progress bar UI for s3 copying

Open kaihendry opened this issue 13 years ago • 32 comments

So I can have an idea how my transfer is doing please

kaihendry avatar Sep 04 '13 15:09 kaihendry

There is a progress meter (of sorts) once the file exceeds a 5MB and is uploaded via multi-part:

[406c8f070d69:~] $ aws s3 cp 512MB.zip s3://bmdixonb/512MB.zip Completed 22 of 74 part(s) with 1 file(s) remaining

Since files smaller than 5MB tend to complete in a second (or two), a progress bar would not help a lot.

Is this what you are seeing? What size was your file? How long did the upload take?

brendandixon avatar Sep 04 '13 16:09 brendandixon

I now see the progress UI as you explained and tbh it's sufficient.

kaihendry avatar Sep 09 '13 09:09 kaihendry

If you're in higher latency parts of the world where connectivity isn't great (e.g. Australia), not having the progress output appear until after the first 5 MB is insufficient. I regularly upload 100 MB files from Sydney to an S3 bucket in the East US and it's beyond frustrating to have no output from the CLI.

Expected behavior:

  1. Upload a file from the CLI with aws s3 cp s3://bucket/file.ext
  2. View file progress/output as soon as the command executes

Current behavior:

  1. Upload a file from the CLI with aws s3 s3://bucket/file.ext
  2. Sit at an empty terminal for extended periods of time

The current behavior leads to a poor interaction and negatively impacts the experience of the aws s3 sp command. Would it be possible to reopen and address this?

ciphertxt avatar Apr 16 '15 11:04 ciphertxt

:point_up: I agree. I work from India - uploads are really slow. Some indication of progress - not necessarily a bar, just the fact that an upload is taking place - would be great!

pastafari avatar Jun 08 '15 05:06 pastafari

Can you reopen this please? From Australia and having the same problem.

ArashJalalian avatar Jul 15 '15 00:07 ArashJalalian

+1

betesh avatar Aug 28 '15 14:08 betesh

I just found a solution for myself for this problem. I changed the AWS CLI S3 configuration. Details for doing so can be found here: http://docs.aws.amazon.com/cli/latest/topic/s3-config.html

I set: max_concurrent_requests = 5 (this prevents timeouts due to hogging bandwidth, probably not necessary for most people) multipart_threshold = 1MB multipart_chunksize = 1MB

By setting the threshold & chunksize to 1 MB, it starts chunking pretty quickly. And even in areas with high latency, it should provide feedback pretty quickly. Of course, you could set it for something even smaller. Then, by piping the output to a file, you can easily determine the progress.

The chunked output looks like "Completed 473 of 477 part(s) with 1 file(s) remaining"

For my purposes, wanting a graphical progress bar, I wrote a script to read the output file, find the last line, and parse the (in my example above) 473 & 477. From there, it's a simple matter to find percent complete and send that to my graphical progress bar.

mcasto avatar Nov 12 '15 06:11 mcasto

Well ... nuts. As I wrote the previous post, I was running a test, and everything seemed to be humming. Shortly after I finished the previous post, I got an error (EntityTooSmall) because the final chunk was smaller than the minimum allowed size. Now I'm looking into either changing minimum allowed size or, if it can't be changed, finding out what it is and setting my multipart_chunksize accordingly.

mcasto avatar Nov 12 '15 06:11 mcasto

Ah. Well. It appears 5MB is the minimum allowable size for multipart upload. So this is a dead end for providing any sort of feedback in a timely manner over a slow connection. Sorry if I got anyone's hopes up.

mcasto avatar Nov 12 '15 06:11 mcasto

The total parts number displayed even on slow connections would be very useful!

+1

andybergon avatar May 11 '16 00:05 andybergon

+1

enissay14 avatar May 12 '16 10:05 enissay14

Agree, It could be helpful.

fro avatar May 28 '16 09:05 fro

+1

ilijaljubicic avatar Jun 14 '16 07:06 ilijaljubicic

+1

aussiDavid avatar Jun 25 '16 03:06 aussiDavid

+1

attaboy avatar Jun 26 '16 19:06 attaboy

+1 Uploading from Israel. Waiting for the first 5Mb can take a long time.

adamatan avatar Jul 03 '16 12:07 adamatan

+1

sebastianvera avatar Jul 18 '16 04:07 sebastianvera

We can use the rsync progress bar format - both the CLI parameter --progress and the nicely-built percentage and size preview.

screen shot 2016-07-18 at 4 05 52 pm

adamatan avatar Jul 18 '16 13:07 adamatan

+1

daniel-ro avatar Jul 29 '16 10:07 daniel-ro

+1 This is really necessary. I'm uploading 5 GB to S3 and I don't know what's comming on since I'm stuck at package X of N with a poor internet connection... and don't blame the connection!

Please consider doint it like s3cmd does: http://s3tools.org/s3cmd

LufoX11 avatar Aug 04 '16 17:08 LufoX11