aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.46k stars 4.1k forks source link

Need high level API for Glacier multipart-upload #1280

Open quiver opened 9 years ago

quiver commented 9 years ago

Glacier supports multipart uploads just like S3, and do the following steps.

  1. initiate multipart-upload
  2. multipart uploads
  3. complete-multipart-upload

The hard part is #3. glacier complete-multipart-upload command requires --checksum which is the SHA256 tree hash of the entire archive, but there is no easy way to compute this checksum with shell scripts. http://docs.aws.amazon.com/cli/latest/reference/glacier/complete-multipart-upload.html

It would be great if glacier has high level cp command and

if FILESIZE < MULTIPART_THRESHOLD: 
    basic upload-archive
else:
    multipart-upload

As you know, s3 cp command works this way(8MB threshold is used there).

jamesls commented 9 years ago

Yeah I think this would be a great addition to the CLI.

ASayre commented 6 years ago

Good Morning!

We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI.

This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports.

As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions.

We’ve imported existing feature requests from GitHub - Search for this issue there!

And don't worry, this issue will still exist on GitHub for posterity's sake. As it’s a text-only import of the original post into UserVoice, we’ll still be keeping in mind the comments and discussion that already exist here on the GitHub issue.

GitHub will remain the channel for reporting bugs.

Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface

-The AWS SDKs & Tools Team

This entry can specifically be found on UserVoice at: https://aws.uservoice.com/forums/598381-aws-command-line-interface/suggestions/33168388-need-high-level-api-for-glacier-multipart-upload

jamesls commented 6 years ago

Based on community feedback, we have decided to return feature requests to GitHub issues.

keisentraut commented 4 years ago

I had the same problem three years ago which is why I wrote a small C program which calculates the tree hash for the glacier API. You can find it at my repo awstreehash.

However, I actually don't recommend this anymore. Since November 2018 there is a much easier way now. If you don't insist on using the glacier API, then you can simply use the S3 API: aws s3 cp --storage-class DEEP_ARCHIVE /path/to/file s3://example-bucket/path/to/file.