This week I will start AWS S3 series. As previous posts, I will try to explain the configuration of S3 by using examples. AWS S3 (Simple Storage Service) is basically a highly available cloud storage that can store unlimited data. S3 can be used for different scenarios as AWS mention on its page:
Content Storage and Distribution
Storage for Data Analysis
Backup, Archiving and Disaster Recovery
Static Website Hosting
Today I will explain the S3 fundamentals including buckets,objects,folders,keys,access controls(Access control list, bucket policies). So let’s start…
We use bucket to store our object in AWS S3. At first we have to create a bucket in order to store data. Every bucket and objects can be accessible by an URL and the URl format is as below:
https://s3-region.amazonaws.com/bucket/object ( When we create bucket we can choose the region )
For example I created a bucket named “wekanban” and uploaded a file named “test.txt” in Ireland region. I can access the file by using the URL http://wekanban/s3.amazonaws.com/test.txt ( Of course I made the object public ). It will redirect to http://wekanban.s3-eu-west-1.amazonaws.com/test.txt.
Also I can reach it by using https://s3-eu-west-1.amazonaws.com/wekanban/test.txt
Objects are the uniquely identified entities stored in Amazon S3. Every object has data and metadata. I want to explain the objects by giving example again. As my previous example, let’s examine the “test.txt” object.
Object has a key name “test.txt” .
Object data is contents of it : http://wekanban.s3.amazonaws.com/test.txt https://s3-eu-west-1.amazonaws.com/wekanban/test.txt
Object metadata’s key is “Content-Type” and the value of it is “text/plain”.
There are two types of metadatas: System metadata and user-defined metadata. For more information visit this link
Folders are also objects and only available in the AWS Management Console. When you create a folder and upload an object the object’s key name will be folder/object. For example, if I create a folder named “scripts” and upload a object named “demo.sh” , object’s full key name will be “scripts/demo.sh”.
Key is the unique identifier of the objects and every object can have only one key. By using keys we can access the objects as I mentioned before as “scripts/demo.sh”.
We can now create a sample bucket and upload an object. I will write another detailed posts about buckets,objects and other S3 topics.
First of all we will create a bucket in Ireland region and I will name it as “my.s3.demo.bucket”. Here there are some details like “Set up logging” but I will explain them in next posts.
Our bucket is created now and we can see the details and configure our buckets.
Now let’s upload an object to our bucket. As you see we can upload a file as max 5TB. We can add or drag/drop files in upload page. Again there are details like encryption,reduced redundancy but these will be explained later…
We can monitor the upload progress in “Transfers” tab of the console.
So our object is uploaded and by clicking it we can see the properties of it as below. It gives information about the bucket name, object name, size and etc. Also we can configure the object properties here.
When we right click on the object, there are options as open,download,make public etc. Let’s make it public and test if we can get our object.
Before making it public let’s try to access it.
As you see it gives “Access Denied” since only I can access it now. Let’s make it public now.
So this was a little introdcution of S3. On next posts I will explain them in detail. If you have any question or comment, please feel free to write and don’t forget to share please.