Let us now upload and download data from S3, using:
AWS Console
AWS CLI
Using AWS Console (via GUI)
Click on S3 to open the Amazon S3 Console.
Scroll through the list of buckets and click on your new bucket. NOTE: make sure you click on the bucket name link, and not just select the bucket using the checkbox.
The files will be uploaded to the S3 folder and the file object names will appear in the list of the objects.
Using AWS CLI (from the EC2 instance)
IMPORTANT: Make sure you have configured the AWS CLI credentials (Refer to Section V.a for AWS CLI configure commands).
aws s3 ls
Output will be a list of buckets including the new bucket which was created above.
List the contents of the bucket
aws s3 ls s3://{Bucket Name}
Verify that the output includes your uploaded files.
Download files from the S3 bucket
To download files we will use the AWS CLI s3 cp command.
aws s3 cp s3://{Bucket Name}/{object name} ./
Verify the download by listing the directory and confirm the object is present.
For more detailed steps on AWS CLI for S3 refer to Section VI (Download data shared using Amazon S3) of the workshop.
Upload files to the S3 bucket
To upload files we will use the AWS CLI s3 cp command.
aws s3 cp ./{your-file} s3://{Bucket Name}/
aws s3 ls s3://{Bucket Name}