Public Repository

Last pushed: 2 years ago
Short Description
Upload a single file to your AWS S3 bucket.
Full Description

This image will upload a single file to your AWS S3 bucket without the need to install AWS SDK tools on the client (e.g., Boto).

All you need is AWS credentials:


Here is an example docker run command to upload a file from /Users/johnparsons/test.txt.

docker run -it --rm -v /Users:/Users -v ~/.aws:/root/.aws jpparsons/s3upload:latest /bin/sh -c "s3upload -f /Users/johnparsons/test.txt -b jpparsons -r us-west-1"

It binds 2 volumes, one for the base upload folder and one for credentials. The shell command is for the Golang binary I built that uses the AWS SDK (aws-sdk-go) to perform the upload.

The options are
-f full path to upload file (the volume bind mount makes this path available into the container)
-b the AWS bucket name
-r the AWS region

Iv’e added a timestamp to file uploads for this demo so you can upload the same file multiple times. It gzip’s all file types.

Docker Pull Command