Difficulty Level: 1
Creation Date: June 23, 2020
Original Author(s): Thyago Mota
Contributor(s):
The goal of this lab is to illustrate how to create an S3 bucket and access it from a client computer via AWS CLI (command-line interface).
Amazon S3 (Simple Storage Service) is an object-based storage service. An object is a file with attributes like name, value, access control info, etc. Access to objects in S3 is done through an API. Amazon S3 use containers called buckets to store objects. Bucket names are globally unique.
After naming your bucket you can accept all of the default options.
Available here.
Go to IAM - Users and then select your user. Then go to Security credentials and create an access key. Download the key you created (a csv file) and use it on the next step.
Open a terminal and configure your access key and default region on AWS CLI using:
aws configure
When prompted, enter your access key ID, access key secrete, and region (short) name.
Open a terminal window and create a folder called lab-013. Then copy a few files to that folder.
First list all of your buckets using:
aws s3 ls
If you want to list the objects (and folders) of your lab013-bucket bucket try:
aws s3 ls s3://lab013-bucket
Try uploading some files using:
aws s3 cp file1.txt s3://lab013-bucket
To illustrate downloading a file you can try:
aws s3 cp s3://lab013-bucket/file1.txt file1-copied-back.txt