S3 credentials and access
Connection details, where to get the keys, and commands with AWS CLI, s3cmd, and rclone.
To connect any software via S3, you need four pieces of data.
The concept is in S3 Access: users and credentials; here you have the data and the commands.
Connection data
Endpoint
The repository access URL
In the repository summary, bottom left
Repository name (bucket)
The bucket name, which acts as path
In the repository summary, top left
Access key
The public identifier of the credential
In users › (…) › Keys
Secret key
The private part of the credential
In users › (…) › Keys
📘 Owner and other users
The repository owner user accesses directly, without specifying the repository.
The rest of the users must indicate the repository name (the path) when configuring access, because they are not redirected automatically.
AWS CLI
# Save credentials in a profile
aws configure
# AWS Access Key ID: <ACCESS_KEY>
# AWS Secret Access Key: <SECRET_KEY>
# List the repository contents
aws s3 ls s3://NOMBRE-REPOSITORIO --endpoint-url https://ENDPOINT
# Upload an object
aws s3 cp ./backup.tar.gz s3://NOMBRE-REPOSITORIO/ --endpoint-url https://ENDPOINT
# Download an object
aws s3 cp s3://NOMBRE-REPOSITORIO/backup.tar.gz ./ --endpoint-url https://ENDPOINTs3cmd
rclone
🚧 Take care of the secret key
The secret key gives access to the repository. Do not leave it in the shell history or in plain-text scripts: use credential profiles or environment variables, and rotate it from users › (…) › Keys if you suspect it has been exposed. A different credential per client or per service makes it easier to revoke without affecting the rest.
Signed URLs
To deliver a specific object without giving credentials, you generate a temporary download link.
What it is
A temporary download link for an object
What is it for
Share a specific object without giving access to the repository
Validity
Expires after the time you define
Where to follow
What software you can connect: Compatible clients.
Who accesses and with what permissions: Users and permissions.
The concept of users and credentials: S3 access: users and credentials.
Last updated
Was this helpful?

