aws · cloud · IBM Cloud · linux

ibm cloud: push files to an object storage with AWS CLI

step 1: install the AWS CLI

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

unzip awscliv2.zip

sudo ./aws/install

aws

step 2: configure it

aws configure
AWS Access Key ID [None]: {Access Key ID}
AWS Secret Access Key [None]: {Secret Access Key}
Default region name [None]: {Provisioning Code}
Default output format [None]: json

You can also use environment variables to set HMAC credentials:

export AWS_ACCESS_KEY_ID="{Access Key ID}"
export AWS_SECRET_ACCESS_KEY="{Secret Access Key}"

step 3: start using it

#list bucket's content
aws --endpoint-url {endpoint} s3 ls s3://bucket-1
aws --endpoint-url https://s3.us-south.cloud-object-storage.appdomain.cloud s3 ls s3://bucket-1

#push files
aws --endpoint-url https://s3.us-south.cloud-object-storage.appdomain.cloud s3 cp ./my-file.gz s3://bucket-1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s