{"id":15649312,"url":"https://github.com/dtan4/s3url","last_synced_at":"2025-08-21T03:32:29.236Z","repository":{"id":10481981,"uuid":"65900529","full_name":"dtan4/s3url","owner":"dtan4","description":"Generate S3 object pre-signed URL in one command","archived":false,"fork":false,"pushed_at":"2024-10-28T22:50:26.000Z","size":437,"stargazers_count":40,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T19:55:29.705Z","etag":null,"topics":["aws","s3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtan4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-17T10:59:09.000Z","updated_at":"2024-09-26T08:51:57.000Z","dependencies_parsed_at":"2023-10-17T07:30:06.112Z","dependency_job_id":"ad00d659-d570-4df1-a487-c2b9711c01e2","html_url":"https://github.com/dtan4/s3url","commit_stats":{"total_commits":469,"total_committers":5,"mean_commits":93.8,"dds":0.5159914712153518,"last_synced_commit":"9c99fb483530403d707b30eaaa39291a53f16903"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fs3url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fs3url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fs3url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fs3url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtan4","download_url":"https://codeload.github.com/dtan4/s3url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230487843,"owners_count":18233865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","s3"],"created_at":"2024-10-03T12:29:12.591Z","updated_at":"2024-12-19T19:07:36.731Z","avatar_url":"https://github.com/dtan4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s3url(1)\n\n[![GitHub Actions](https://github.com/dtan4/s3url/workflows/Test/badge.svg)](https://github.com/dtan4/s3url/actions?query=workflow%3ATest+branch%3Amaster)\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=dtan4/s3url)](https://dependabot.com)\n[![codecov](https://codecov.io/gh/dtan4/s3url/branch/master/graph/badge.svg)](https://codecov.io/gh/dtan4/s3url)\n[![GitHub release](https://img.shields.io/github/release/dtan4/s3url.svg)](https://github.com/dtan4/s3url/releases)\n\nGenerate [S3 object pre-signed URL](http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html) in one command\n\n```bash\n$ s3url s3://my-bucket/foo.key\nhttps://my-bucket.s3-ap-northeast-1.amazonaws.com/foo.key?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=AKIA***************************%2Fap-northeast-1%2Fs3%2Faws4_request\u0026X-Amz-Date=20160923T010227Z\u0026X-Amz-Expires=300\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=****************************************************************\n```\n\n## Contents\n\n* [Installation](#installation)\n  + [Using Homebrew (OS X only)](#using-homebrew-os-x-only)\n  + [Precompiled binary](#precompiled-binary)\n  + [From source](#from-source)\n* [Usage](#usage)\n  + [Upload file together](#upload-file-together)\n  + [Options](#options)\n* [Development](#development)\n* [License](#license)\n\n## Installation\n\n### Using Homebrew (OS X only)\n\nFormula is available at [dtan4/homebrew-tools](https://github.com/dtan4/homebrew-tools).\n\n```bash\n$ brew tap dtan4/tools\n$ brew install s3url\n```\n\n### Precompiled binary\n\nPrecompiled binaries for Windows, OS X, Linux are available at [Releases](https://github.com/dtan4/s3url/releases).\n\n### From source\n\n```bash\n$ go get -d github.com/dtan4/s3url\n$ cd $GOPATH/src/github.com/dtan4/s3url\n$ make install\n```\n\n## Usage\n\nYou need to set AWS credentials beforehand, or you can also use [named profile](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-multiple-profiles) written in `~/.aws/credentials`.\n\n```bash\nexport AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX\nexport AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# or configure them in ~/.aws/credentials\n\nexport AWS_REGION=xx-yyyy-0\n```\n\nJust type the command below and get Pre-signed URL on the screen.\n\n```bash\n# https:// URL (both virtual-hosted-style and path-style)\n$ s3url https://BUCKET.s3-region.amazonaws.com/KEY [-d DURATION] [--profile PROFILE] [--upload UPLOAD]\n$ s3url https://s3-region.amazonaws.com/BUCKET/KEY [-d DURATION] [--profile PROFILE] [--upload UPLOAD]\n\n# s3:// URL\n$ s3url s3://BUCKET/KEY [-d DURATION] [--profile PROFILE] [--upload UPLOAD]\n\n# Using options\n$ s3url -b BUCKET -k KEY [-d DURATION] [--profile PROFILE] [--upload UPLOAD]\n```\n\n### Upload file together\n\nIf target object does not exist in the bucket yet, you can upload file with `--upload` flag before getting Pre-signed URL. Following example shows that uploading `foo.key` to `s3://my-bucket/foo.key` and getting Pre-signed URL of `s3://my-bucket/foo.key` will be executed in series.\n\n```bash\n$ s3url s3://my-bucket/foo.key --upload foo.key\nuploaded: /path/to/foo.key\nhttps://my-bucket.s3-ap-northeast-1.amazonaws.com/foo.key?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=AKIA***************************%2Fap-northeast-1%2Fs3%2Faws4_request\u0026X-Amz-Date=20160923T010227Z\u0026X-Amz-Expires=300\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=****************************************************************\n```\n\n### Options\n\n|Option|Description|Required|Default|\n|---------|-----------|-------|-------|\n|`-b`, `-bucket=BUCKET`|Bucket name|Required (if no URL is specified)||\n|`-k`, `-key=KEY`|Object key|Required (if no URL is specified)||\n|`-d`, `-duration=DURATION`|Valid duration in minutes||5|\n|`--profile=PROFILE`|AWS profile name|||\n|`--upload=UPLOAD`|File to upload|||\n|`-h`, `-help`|Print command line usage|||\n|`-v`, `-version`|Print version|||\n\n## Development\n\nRetrieve this repository and build using `make`.\n\n```bash\n$ go get -d github.com/dtan4/s3url\n$ cd $GOPATH/src/github.com/dtan4/s3url\n$ make\n```\n\n## License\n\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtan4%2Fs3url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtan4%2Fs3url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtan4%2Fs3url/lists"}