Skip to content

AWS CLI

Use the AWS CLI with EZGH Object Storage.

Updated View as Markdown

Add a profile to ~/.aws/config with your access key. endpoint_url in a profile needs AWS CLI 1.29 or 2.13 or later.

~/.aws/configini
[profile ezgh]
aws_access_key_id = oak_…
aws_secret_access_key = …
region = us-west-1
endpoint_url = https://s3.us-west-1.ezghapps.com
s3 =
    signature_version = s3v4

On AWS CLI v1, the s3 = block is what makes aws s3 presign use SigV4.

Common commands

export AWS_PROFILE=ezgh

aws s3 mb s3://my-bucket
aws s3 cp report.pdf s3://my-bucket/
aws s3 ls s3://my-bucket/
aws s3 cp s3://my-bucket/report.pdf .
aws s3 rm s3://my-bucket/report.pdf

aws s3 cp splits large files into multipart uploads by itself.

Presigned URLs

aws s3 presign s3://my-bucket/report.pdf --expires-in 3600

--expires-in is in seconds, up to 604,800 (7 days). See Presigned URLs.

Virtual-hosted URLs

For https://my-bucket.s3.us-west-1.ezghapps.com/report.pdf URLs, add addressing_style:

~/.aws/configini
s3 =
    signature_version = s3v4
    addressing_style = virtual
Navigation

Type to search…

↑↓ navigate↵ selectEsc close