Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtbandes/glacier-swift
CLI tool to compute checksums used by AWS S3 Glacier
https://github.com/jtbandes/glacier-swift
aws s3-glacier swift
Last synced: 2 months ago
JSON representation
CLI tool to compute checksums used by AWS S3 Glacier
- Host: GitHub
- URL: https://github.com/jtbandes/glacier-swift
- Owner: jtbandes
- Created: 2021-01-04T05:57:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T02:24:00.000Z (6 months ago)
- Last Synced: 2024-10-16T05:47:27.153Z (3 months ago)
- Topics: aws, s3-glacier, swift
- Language: Swift
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# glacier-swift
This Swift package provides a command-line utility that implements some checksum algorithms used by Amazon S3 and S3 Glacier. This is not a replacement for uploading files (check out the [AWS CLI](https://github.com/aws/aws-cli)), but can be used to verify checksums for some extra peace of mind.
## Usage
```
swift run glacier etag [--chunk-size-mb ] [--chunk-size-bytes ]
swift run glacier sha1 [--chunk-size-mb ] [--chunk-size-bytes ]
swift run glacier sha256 [--chunk-size-mb ] [--chunk-size-bytes ]
```Computes the S3 `ETag` (MD5), SHA-1, or SHA-256 checksum using the algorithm described [here](https://stackoverflow.com/questions/12186993/what-is-the-algorithm-to-compute-the-amazon-s3-etag-for-a-file-larger-than-5gb) and [here](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html). A default chunk size of 8MB is used; this can be configured with the `--chunk-size-mb` or `--chunk-size-bytes` option. (For files uploaded via the AWS Console web UI, use [`--chunk-size-bytes 17179870`](https://stackoverflow.com/questions/12186993/what-is-the-algorithm-to-compute-the-amazon-s3-etag-for-a-file-larger-than-5gb#comment136008274_43819225).)
```
swift run glacier treehash [file]
```Computes the [tree hash](https://docs.aws.amazon.com/cli/v1/userguide/cli-services-glacier.html#cli-services-glacier-complete) of a file (used with the older `aws glacier complete-multipart-upload`).