Overview
This document is designed to help setup and use AWS CLI commands to upload files to ARIA-Share. It will first guide through installing AWS CI and setting up your AWS credentials to allow your system to access the aria-share
S3 bucket. Afterwards, the guide will show a variety of commands to upload files and directories from aria-share
.
Setup
To install and setup AWS CLI for all users using the macOS command line [1,2]
Download the file using the
curl
command. The-o
option specifies the file name that the downloaded package is written to. In this example, the file is written toAWSCLIV2.pkg
in the current folder.curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
Run the standard macOS
installer
program, specifying the downloaded.pkg
file as the source. Use the-pkg
parameter to specify the name of the package to install, and the-target /
parameter for which drive to install the package to. The files are installed to/usr/local/aws-cli
, and a symlink is automatically created in/usr/local/bin
. You must includesudo
on the command to grant write permissions to those folders.sudo installer -pkg ./AWSCLIV2.pkg -target /
To verify the AWS CLI version 2 installed, use the following command as well to verify installation. You should be able to see the version of
aws-cli
that you are running.aws --version
After verifying installation, run the
aws configure
command to setup your credentials. This will includeAccess key ID
,Secret access key
,AWS Region
,Output format
. To help determine these parameters, please refer to the following links:The following example shows sample values. Replace them with your own values as described in the following sections.
$ aws configure AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-west-2 Default output format [None]: json
Commands
How to list objects in
aria-share
bucket [3]aws s3 ls s3://aria-share --recursive --human-readable --summarize
How to upload and download content from
aria-share
bucket [4,5]How to upload file to ARIA-share bucket
aws s3 cp /PATH/OF/FILE_TO_UPLOAD s3://aria-share
How to upload directory to ARIA-share bucket
aws s3 sync /PATH/OF/DIRECTORY_TO_UPLOAD s3://aria-share
How to download file from ARIA-share bucket
aws s3 cp s3://aria-share/FILE_TO_DOWNLOAD /PATH/TO/DIRECTORY
How to download directory from ARIA-share bucket
aws s3 sync s3://aria-share/DIRECTORY_TO_DOWNLOAD /PATH/TO/DIRECTORY
Here are a few flags to use to help make uploads and downloads more efficient
--dryrun
(boolean) Displays the operations that would be performed using the specified command without actually running them.--include
(string) Don't exclude files or objects in the command that match the specified pattern. See Use of Exclude and Include Filters for details.--exclude
(string) Exclude all files or objects from the command that matches the specified pattern.
Add Comment