Awscli

From wikinotes

awscli allows you to interact with AWS from the cli. nice for bash scripts.

Configuration

~/.aws/credentials

[default]
aws_access_key_id = #...
aws_secret_access_key = #...

vendor notes

digitalocean exposes it's own version of S3, with a compatible API.

When using awscli, you must specify --endpoint=https://{region}/digitaloceanspaces.com.


Services

S3

aws s3 ls

aws s3api put-object --bucket {bucket} --key path/to/dir/  # create directory
aws s3 cp src.tar s3://path/dst.tar                        # copy file
aws s3 rm s3://path/dst.tar                                # rm file