Blog

What is Amazon S3 and how to use it?

pan serwer Łukasz Kwaśniewicz
Share

AWS offers a wide range of capabilities. To begin with, however, you need to know how to use them. One of the primary services on offer is Amazon S3. What is the service? You will find out through reading this article.

What is the S3 service?

You can even read about what Amazon S3 is in Wikipedia. In the article, however, I will approach the topic from the practical side and focus on the most useful functionalities of the service offered by Amazon. S3 stands for Simple Storage Service and is a storage service offered by the Amazon Web Services. The main task of this solution is the ability to store and easily access any amount of data. Amazon Simple Storage Service, is usable on its own, in collaboration with other Amazon Web Services, and provides the ability to work with third-party programs.

It is most often used for:

  • Big Data Analytics
  • Backup and archiving
  • Storage and distribution of content
  • Disaster Recovery
  • Mobile applications
  • Hosting of static files (such as photos)

Amazon S3 – key concepts

It is worthwhile to familiarize yourself with the key terms that are often used in the article to describe the operation of Amazon Simple Storage Service (Amazon S3).

Key wording:

Bucket – this is a type of folder in which objects are stored. Its role includes. organizing space within S3, as well as granting access to it.
Objects – buckets store files, which we call objects.
Key – we talk about the key in the case of a unique identifier of an object within a bucket. In Amazon’s Simple Storage Service, each object can be identified by a combination of the bucket name, key and, in optional form, the version id of the object.
Region – is the geographical location of Amazon’s data storage. At the moment, there are 14 such locations. What region we choose is very important, as it affects, among other things. on data transmission delays and the cost of this service.
Availability Zone (AZ) – is an isolated location within a single Data Center region.

Advantages

Now you know what Amazon S3 is and how you can use it in your business. You also know the key concepts that make this service easy to use. You’re probably wondering what makes this solution unique and what are its main benefits?

There are many of them. In my opinion, the most important are:

  • Instant start – You don’t have to worry about purchasing and configuring infrastructure.
  • Unlimited space – With Amazon S3, your storage space has virtually no limits. As a result, there is no fear of a situation in which it might run out. We should only keep an eye on the size of a single object, which is 5 TB.
  • Scalability – Don’t guess how big a drive you’ll need! With the Amazon S3 service, there is no need to declare what space will be used. You put the amount of data you need without worrying about lack of disk space.
  • Cost – With Amazon’s service, you have the option of paying only for what you actually use. The current Amazon S3 – can be found here.
  • Durability – 99.999999999% is the level at which Amazon guarantees data durability. This way you can be sure that if you put your data on Amazon S3, it is safe and actually there.
  • High availability – 99.99% – a level guaranteed by AWS. It is measured by access to data when you need it.
  • Access in different ways – Depending on your needs, you can access your data through:
    – AWS console,
    – SDK,
    – API,
    – CLI.
  • Security – How is the transfer encrypted? SSL is used for this. Objects are secured in several ways, we can do it with the popular SSE, which is an automatic server-side encryption (256 bits) for writing and reading data.

Amazon S3 tips

You may be wondering what to look out for when creating a bucket in Amazon S3? How to use its capabilities? With the bucket configuration option, you will find some interesting tips, which we will describe below.

One of the more interesting features of Amazon S3 is the Lifecyle Rules setting. With them, you can automatically delete objects or archive them. By creating a bucket, you can configure it so that the objects that are in it will delete themselves after a certain period of time.

If you don’t have a need to delete them and at the same time don’t use them, archiving is a good option. AWS allows you to set up a rule to move data to the Amazon Glacier service. Why move data and not keep all objects on Amazon S3? The answer is – price. Glacier is the cheapest storag solution offered by Amazon. By choosing this service, you have the option of storing data available on demand. You will gain access to them after just about. 3-5h, after making an appropriate request.

When placing objects in a bucket, you can choose their class. By opting for the standard class, the guaranteed durability and availability will be at the levels I mentioned earlier (99.999999999% and 99.99%, respectively). We can also opt for a solution called reduced redundancy. This class offers lower levels of availability and durability, but it is a less expensive storage solution than the standard class. An even cheaper solution is the aforementioned Amazon Glacier.

By opting for the AWS standard class, by default our data will be saved in a minimum of 3 AZ. Which means they will be stored in a minimum of 3 locations. In the event of the possible unavailability of one of them, our query will be automatically redirected to another Availability Zone, thus ensuring continuous access to data.

It is also possible to store all versions of an object. This makes it easy to recover data if it is inadvertently overwritten or deleted.

Want to restrict access to a bucket or facility? You can configure it. Specify access policies either at the bucket level or by setting permissions within the IAM service (used to manage user accounts in AWS). This way you decide who has access to the data you store and to what extent.

These are only selected capabilities of Amazon S3. There are, of course, many more. AWS gives us a choice of what the storage will ultimately look like, depending on your needs.

How to set up Bucket?

Creating a bucket is not a difficult task and it only takes a few clicks to enjoy its capabilities. As an introduction, I will show you how to create a bucket in AWS in a simple way. Before we get started, however, take care of your Amazon Web Services account, which is necessary for this operation. You create them by going to the AWS website and clicking on the top right corner of aws.amazon.com

Pic. 1

If you have already gone through the process and created an account, in the AWS Management Console view, go to “Storage” and then select the S3 tab.

Pic. 2

After going to the sub-page, you will see the management panel of your Amazon S3. If you have just created an account, the table in the view will be empty. To create a bucket, click the “Create bucket” button.

Pic. 3

Name and region

Name Bucket with a unique, unmistakable name across the entire AWS infrastructure, not just your account. In the later stages, you can no longer change it, so think carefully about your choice. It is good practice to include in the name a reference to what we will be inside.

In the region field, select the one suitable for your requirements. Which data to choose in a given region? If you are operating in Europe and care about speed, it is best to have Frankfurt (eu-central-1,) Ireland(eu-west-1) or London (eu-west-2). If price is more important to you, it’s better to choose a region in the U.S., such as the U.S. N.Virginia (us-east). Once this is done, you could complete the process and create the bucket by selecting “Create.” Don’t do it yet. Below we will show you the advanced configuration.

Pic. 4

It is possible, to use the advanced wizard, the configurations of which we will now go through together. Instead of the “Create” button, click “Next”. You should see the following view :

Pic. 5

What are the different tabs responsible for?

  1. Versioning – With this option, you have the ability to keep multiple versions of the same file in the bucket. This will come in handy as a way to protect files from accidental overwriting or deletion.
  2. Server access logging – It allows you to track access requests. Access rules allow us to select information that is of high priority to us. Running this option allows you to specify the requester, the bucket name, the time of the request, the requested action, the response status and a possible error code. This function, finds application in security and access audits and expense control.
  3. Tags – Monitor your current costs versus assumed costs.
  4. Object – level logging (additionally paid function). Using the Cloudtrail service, it allows you to track predetermined bucket events ( i.e. deletion of files with a specific name).
  5. Default encryption – Offers the ability to set default encryption so that all objects stored in the bucket are encrypted.

Once you have selected your preferred settings, you can proceed to the next step by clicking “Next.”

Entitlements

This tab is used to grant permissions (public or specific person permissions) to place and delete objects in the bucket, as well as to read and overwrite them. What accesses you grant are up to you.

Pic. 6

When you have configured the permissions appropriately for your needs, click the “Next” button.

At the end of the process, you will see a summary with all the selected options. However, if you want to decide to change something at this stage, you can do so using the “Edit” button. If, on the other hand, everything checks out, click the “Create” button.
During configuration, I did not select additional functionality. My screen looks as follows:

Pic. 7

Amazon S3 – completion

In the above article, the Amazon S3 service was introduced. After reading it, you already know what it is used for and what its advantages are. You also know examples of interesting configurations, you know how to create the first bucket in Amazon S3.

Of course, this is only a small fraction of what Amazon Web Services offers. Amazon S3 can also be used to host a static website. The real ocean of possibilities that Amazon gives us is the ability to bundle services. However, for this you need a good knowledge of AWS offerings and extensive experience in the field. So if you need help setting up Amazon Web Services, please contact us. Or have you wondered how to put up a website on Amazon S3? Our certified experts are ready to help you. For more information head to here.

Contact

Do you have questions? Get in touch with us