This step-by-step how-to guide will help you store your files in the cloud using Amazon Simple Storage Solution (S3). Amazon S3 is a service that enables you to store your data (referred to as objects) at massive scale. In this guide, you will create an Amazon S3 bucket (a container for data stored in S3), upload a file, retrieve the file, and delete the file.
The resources you create in this guide are AWS Free Tier eligible.
Enter the Amazon S3 console
Click on the AWS Management Console home to open the console in a new browser window, so you can keep this step-by-step guide open. When the screen loads, enter your user name and password to get started. Then type S3 in the search bar and select S3 to open the console.
Create an S3 bucket
In this step, you will create an Amazon S3 bucket. A bucket is the container you store your files in.
a. In the S3 dashboard, click Create Bucket.
If this is the first time you have created a bucket, you will see a screen that looks like the image pictured here.
If you have already created S3 buckets, your S3 dashboard will list all the buckets you have created.
b. Enter a bucket name. Bucket names must be unique across all existing bucket names in Amazon S3. There are a number of other restrictions on S3 bucket names as well. Then select a region to create your bucket in.
c. You have the ability to set permission settings for your S3 bucket. Leave the default values and select Next.
Upload a file
In this step, you will upload a file to your new Amazon S3 bucket.
a. You will see your new bucket in the S3 console. Click on your bucket’s name to navigate to the bucket.
b. You are in your bucket’s home page. Select Upload.
c. To select a file to upload, either click Add files or Add folder and select sample file(s) that you would like to store or Drag and Drop a file on the upload box. Your file(s) will be displayed after you have selected file(s) to upload.
d. You have the ability to review destination details and permissions. For this tutorial, leave the default values.
e. You have the ability to set property settings like storage class, server-side encryption, additional checksums, tags, and metadata with your object. Leave the default values and select Upload.
f. You will see your object in your bucket’s home screen.
Retrieve the object
In this step, you will download the file from your Amazon S3 bucket.
a. Select the checkbox next to the file you would like to download, then select Download.
Delete the object and bucket
You can easily delete your object and bucket from the Amazon S3 console. In fact, it is a best practice to delete resources you are no longer using so you don’t keep getting charged for them.
a. You will first delete your object. Select the checkbox next to the file you want to delete and select Delete.
b. Review and enter permanently delete in the text input field to confirm deletion. Click Delete objetcs.
c. Click on Amazon S3 > Buckets to view all your buckets in the region.
d. Select the radio button to the left of the bucket you created, then click Delete.
e. To confirm deletion, enter the name of the bucket in the text input field and click Confirm