See abashev/vfs-s3, the jets3t samples and the commons-vfs Javadoc.
You might want to install AWS CLI to make working with AWS S3 easier.
Here is a typical configuration file for AWS CLI. This demo uses the same configuration file:
$ cat ~/.aws/config
[default]
aws_access_key_id = AKIADFIUYFEWFOEWFJLEWHF
aws_secret_access_key = JI1OKdRTrXMudidsdfoiwpeofiwepoifpew
region = us-east-1
This demo requires an AWS S3 bucket that your credentials have read/write access to.
Let's call that bucket mybucket
. You can run the demo like this:
$ aws s3 mb mybucket # create bucket
$ sbt "runMain VTest mybucket"
$ aws s3 ls mybucket # verify that README.md was copied to mybucket