Skip to content
/ presign Public

A CLI to generate presigned S3 URLs for GET or PUT

License

Notifications You must be signed in to change notification settings

hoop33/presign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Presign

Generate S3 presigned URLs for both put and get

Rust

Overview

You can generate presigned URLs for S3 objects using the AWS CLI, but for GET only (from what I can tell). This is a simple CLI for generating presigned URLs for either GET or PUT.

Usage

presign 0.1.0
Generate a presigned S3 URL for GET or PUT

USAGE:
    presign [OPTIONS] --bucket-name <bucket-name> --file <file>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -b, --bucket-name <bucket-name>    The bucket name for the presigned URL
    -e, --expiration <expiration>      The expiration, in seconds, for the presigned URL [default: 3600]
    -f, --file <file>                  The file for the presigned URL
    -m, --method <method>              The method for the presigned URL [default: put]
    -p, --profile <profile>            The AWS profile to use
    -r, --region <region>              The AWS region the bucket is in [default: us-east-1]

For example, to create a presigned URL to PUT file test.txt in bucket mytest:

$ presign --bucket-name mytest --file test.txt

To create a presigned URL to GET file test.txt in bucket mytest with a 5 minute expiration:

$ presign --bucket-name mytest --file test.txt --expiration 300

Credits

Thanks to the developers / maintainers of these libraries:

If you look at the source, you'll see it's very thin wrapper of those two crates.

License

Copyright © 2020 Rob Warner

Licensed under the MIT License

About

A CLI to generate presigned S3 URLs for GET or PUT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages