Lab3: Introduction to Amazon Simple Storage Service (S3)

Amazon Simple Storage Service is known as Amazon S3. It is a cloud storage service for the Internet. It is a simple web service interface that is used to store, download any amount of data from anywhere anytime on the web. Amazon S3 designed to make web-scale computing flexible and easier to the users. Amazon S3 stores data as objects within buckets, and object is comprised of a file and any metadata that describes that file.

Objects belonging to a bucket that you create in a specific AWS Region never leave that region, unless you explicitly transfer them to another region. For example, objects stored in the EU (Ireland) region never leave it.

This lab I will demonstrate the basic Amazon S3 activities including

  • Creating a Bucket in Amazon S3
  • Adding an Object such as file and folder to  Amazon S3
  • Creating folder to the buckets
  • Viewing the objects in a bucket
  • Moving and Accessing the objects from a bucket
  • Deleting Bucket from Amazon S3 services

Steps for the task: Creating a bucket in the Amazon S3

To upload any data, you first need to create buckets. The bucket is kind of root file for Amazon S3 services. It is containers for objects.You can upload any number of objects to the bucket.  Buckets and objects are called resources and Amazon provides Amazon S3 API to manage them from the user end. Amazon S3 client also can Amazon S3 console to perform the operation. The operation process is that Amazon S3 console uses the Amazon s3 API to send a request to Amazon S3.

  1. Click S3 under Storage services in the AWS management Console. You will get Amazon S3 dashboard

1.jpg

2. Click on “Create Bucket“.

Note: You will not be charged for creating a bucket; AWS only charged for storing objects in the buckets. The AWS account is the owner of the bucket that created it. An AWS account can be created 100 buckets by default. However; If you need more additional buckets, you can increase it by submitting a service limit increase. If a bucket is empty you can delete it. After deleting the buckets you can reuse the name but sometimes you’ll face some problem to reuse available name again for some reasons 

If a bucket is empty you can delete it. After deleting the buckets you can reuse the name but sometimes you’ll face some problem to reuse available name again for some reasons; most probably, another account could create the bucket with the same name.If you want to use the same name; the best recommendation is that never delete your buckets until bucket limit exceed because AWS doesn’t charge for creating buckets.

2.jpg

3. After clicking on Create bucket; a dialogue box will open. Type a bucket name in the Bucket Name box. You can accept default region or you can mention your region by your own preference. Click “Create“. The bucket will be created. In this lab exercise, I have created two buckets: bucketnumberonetests3 and bucketnumbertwotests33.jpg

Note: Remember that after creating a bucket, you will not allow changing bucket name anymore. Furthermore, bucket name is displayed in the URL that points to the objects stored in the bucket. 

Amazon S3 bucket name is globally unique regardless of AWS region. Amazon clients can choose any AWS Region that is geographically close to them to optimise latency, minimise costs, or address regulatory requirements.

Managing and Accessing buckets: You can control accessing buckets and managing buckets such as create, delete, and list objects in the buckets and view access logs for the buckets and its objects and choose the geographical region where Amazon S3 will store the buckets and its contents by enforced AMI Group policies and user permission. You can apply for a role on users who can access which buckets and access which objects. When you upload a file, you can also set permission on the object, and metadata as well.

Steps for the task: Adding an Object such as file and folder to  Amazon S3

We already created two buckets. We are now ready to store an object to it. objects mean any kind of file such as text, photo, audio, video, a zip file etc. We can also set permission during upload to control access to the file.

1.Click the name of the “Amazon S3 Bucket” in the Amazon S3 bucket where you want to upload the file. In this lab: I will upload a file in the bucket name: bucketnumberonetests3. Click upload. You will get Upload Wizard. You can upload an individual file or any can upload a bunch of files together or you can upload a folder by drag and drop. Then Click “Add file”. You will view a file selecting dialogue box, now select the file you want to store.

4

2. Click Next after selecting the file. Now we can setup file permission such who can read the file or who can write or modification file or who will get both permissions. Set permission can be the handle to manage users and manage public permission.

5.jpg

3. Click next. You will get set properties options. Two options are available: Storage class and Encryption. Choice one depends on your use case environment and performance access requirement.

6.jpg

4. Now click Next. Here you can review your files, permission and properties. If you need any change, you can change it by clicking on “Edit“.

7.jpg

5.After review, If everything is okay. Click on “Upload”. The will get the following Amazone S3 Management console of Buckets window with objects.8.jpg

Step for the task: Creating folder to the buckets

You can create the unlimited folder under one bucket. It’s good practice to create a folder then upload objects into the folders. It will help AWS account holder to manage their objects based on objects class such as you can upload all audio files in the Audio folder, the video file in video folder, photos into photo folders.

  1. Click on “Create Folder“. A Folder creation dialogue box will be available in the bucket page. Give the name of the folder.  I made an Audio folder. I will keep my audio file in this folder. Then click Save. The folder will be made. Now you can add objects to the newly folder same way previously we added the object in the bucket. You can make any number of folders under each folder.9

Step for the task: Viewing the objects in a bucket

We already added objects in our buckets. Now we will open, view it in a browser, and also we can download our objects from buckets.

  1. Click on the object which you want to view. You will get the following a window. Click overview, you can see four options: open, Download, Download as, Make public. We want to view our file. We will click on Open. If we want to download the file, we will click on download. or we can view the file through URL by the link below: https://s3-us-west-2.amazonaws.com/bucketnumberonetests3/1.jpg10.jpg

Step for the task:  Moving and Accessing  the objects from a bucket

Now we will move an object from bucketnumberonetests3 to bucketnumbertests3.

  1. Click on the object which one you want to move. Click More. Move your mouse on Cut and click. The object will be cut from the current bucket.11
  2. Go to the destination bucket where you want to move the object. Click on More and paste the object here.12
  3. Now you can see an object (1.jpg) has been moved from source bucket:bucketnumberonetests3 to destination bucketnumbertwos3.13

Deleting an object and bucket in Amazon S3:

In this lab, we will delete an object from the bucket and we will delete an empty bucket. Note: Remember, You can only delete a bucket when it is empty. With an object, you can not delete a bucket.

  1. Click on the object you want to delete. 14.jpg
  2. Then click on More and select “Delete“. Delete objects wizard come. Click on Delete. The object will be deleted from the bucket.15.jpg
  3. For deleting a bucket, go to the buckets console. Select the bucket you want to delete and click Delete. You can empty the bucket by clicking on “Empty bucket”.  16.jpg
  4. A wizard is will come where you have to type the exact name of the bucket for deleting and click Confirm. The bucket will be deleted. Note: You can create a bucket again by using the same name if other users do not take the name in the meantime.17.jpg

Cost Analysis

AWS Free Usage Tier*

A new AWS customers receive 5 GB of Amazon S3 standard storage, 20,000 Get Requests, 2,000 Put Requests, and 15GB of data transfer out each month for one year.

Storage Pricing (varies by region)

Price for US West Oregon Region (Data collection March 20, 2017, Source: https://aws.amazon.com/s3/pricing/)

Plan Standard Storage Infrequent Access Storage Glacier Storage
First 50 TB / month $0.023 per GB $0.0125 per GB $0.004 per GB
Next 450 TB / month $0.022 per GB $0.0125 per GB $0.004 per GB
Over 500 TB / month $0.021 per GB $0.0125 per GB $0.004 per GB

Price for Asia Pacific (Sydney) Region:

Plan Standard Storage Infrequent Access Storage Glacier Storage
First 50 TB / month $0.025 per GB $0.019 per GB $0.005 per GB
Next 450 TB / month $0.024 per GB $0.019 per GB $0.005 per GB
Over 500 TB / month $0.023 per GB $0.019 per GB $0.005 per GB

Compare two separate regions, you can notice that price for Asia Pacific Sydney is a little bit higher than US West Oregon. You can choose your plan based on availability zone and Region that offer you less price.

Data Transfer Pricing (Varies by region)

Data transfer price depend on Data transferred “in” to and “out” of Amazon S3  including over either Direct Connect or the public Internet. Transfers between S3 buckets or from S3 to any service(s) within the same region are free.

But If you transfer data from your region to different region, you will be charged for data transfer and each region data transfer pricing is different.

US West Oregon Region:

Data Transfer OUT From Amazon S3 To
Amazon EC2 in the same region $0.000 per GB
Another AWS Region $0.020 per GB
Amazon CloudFront $0.000 per GB
Data Transfer OUT From Amazon S3 To Internet
First 1 GB / month $0.000 per GB
Up to 10 TB / month $0.090 per GB
Next 40 TB / month $0.085 per GB
Next 100 TB / month $0.070 per GB
Next 350 TB / month $0.050 per GB

Asia Pacific (Sydney) Region:

Data Transfer OUT From Amazon S3 To
Amazon EC2 in the same region $0.000 per GB
Another AWS Region $0.140 per GB
Amazon CloudFront $0.000 per GB
Data Transfer OUT From Amazon S3 To the Internet
First 1 GB / month $0.000 per GB
Up to 10 TB / month $0.140 per GB
Next 40 TB / month $0.135 per GB
Next 100 TB / month $0.130 per GB
Next 350 TB / month $0.120 per GB

Note: If you need more than 350TB data transfer per month, you have to contact AWS. 

Amazon S3 Transfer Acceleration Pricing: Transfer Acceleration pricing is in addition to Data Transfer pricing on AWS edge Location.

Data Transfer IN to Amazon S3 from the Internet:

Accelerated by AWS Edge Locations in the United States, Europe, and Japan $0.04/GB
Accelerated by all other AWS Edge Locations $0.08/GB
Data Transfer OUT from Amazon S3 to the Internet:
Accelerated by any AWS Edge Location $0.04/GB

Data Transfer between Amazon S3 and another AWS region:  Accelerated by any AWS Edge Location is $0.04/GB

Note: You can also calculate your cost for AWS services through Amazon monthly services calculator (https://calculator.s3.amazonaws.com/index.html)

Confirmation Email of Completing the Amazon S3 lab:

completion email.jpg

Thank you 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s