Simple HTTP server which proxies requests to Amazon Simple Storage Service. It allows legacy HTTP fetchers to download privately shared files from Amazon S3 buckets.
Use the following URL format to download a file from S3 bucket over s3proxy:
$ curl http://localhost:8080/s3-region-name/s3-bucket-name/path/to/your/file.txt
Specify AWS credentials or EC2 Role Provider URL as environment variables and specify a port number as the only parameter:
$ AWS_ACCESS_KEY_ID=XXXX AWS_SECRET_ACCESS_KEY=XXXX s3proxy 8080
or
$ s3proxy 8080
which would have the same effect as
$ AWS_METADATA_URL=http://169.254.169.254:80/latest s3proxy 8080
- Edit
s3proxy.marathon.json
: - Specify credentials with
env.AWS_ACCESS_KEY_ID
andenv.AWS_SECRET_ACCESS_KEY
or EC2 Role Provider URL withenv.AWS_METADATA_URL
or do not specifyenv
at all which would have the same effect as if you setenv.AWS_METADATA_URL
tohttp://169.254.169.254:80/latest
. - Specify path to some small file which resides on S3 bucket with
healthChecks.path
in order to set health-check or removehealthChecks
field if you don't want to have health checks. - If you'd like to use your own build of s3proxy, then change s3proxy executable URI with
uris[0]
. Default URI points to the file built for 64-bit Linux. - Deploy s3proxy using Marathon UI or DC/OS CLI:
$ dcos marathon app add s3proxy.marathon.json
- Install Go: https://golang.org/doc/install
- Run
$ GOOS=linux GOARCH=amd64 go get github.com/adyatlov/s3proxy
Omit setting GOOS
and GOARCH
if you'd like to build s3proxy for the host platform.