Amazon Computer Services
S3 is a cloud-based object storage service from Amazon. It is hugely scalable and creates it simple to access storage over the internet. We can use S3 for storing and retrieving virtually unlimited amounts of data at anytime from anywhere. It provides us with access to a highly scalable, reliable, efficient, and low-cost storage infrastructure that is used by Amazon to run its global network of websites.
The following section describes the concepts and terminologies used in S3:
A bucket is a logical unit in S3, just like a folder. It is a container wherein we can store objects and also folders. Buckets are created at the root level in S3 with a globally unique name. Any number of objects can be stored in each bucket.
Buckets are generally used for organizing objects in S3. It is associated with an AWS account that is responsible for storing and retrieving data on the bucket. Buckets play a vital role in access control and pave the way for creating usage reports on S3.
Buckets can be created in a specific region. We can enable version control on a bucket. If version control is enabled on a bucket, it maintains a unique version ID against each object stored in it.
Objects are the basic entities stored in S3. Each object consists of the data, metadata, and a globally unique identifier. Metadata is data about data and provides basic information about the data stored in an object. Metadata is stored in a set of name-value pairs, which describes the data associated with the object. For example, Date Last Modified, Content-Type, Content-Length, and so on. There can be two types of metadata related to an object: system-defined metadata and user-defined metadata.
A key is a name that is assigned to an object. It is a unique identifier or name for an object within a bucket. Every object in a bucket has only one key associated with it. The combination of a bucket, key, and its respective version ID uniquely identifies an object within a bucket.
Every object within a bucket has a unique address for accessing it through a web service endpoint.The address URL consists of the bucket name, key, and a version number if versioning is enabled on the bucket.
A region is a geographical region where Amazon S3 stores a bucket based on user preferences. Users can choose a region while creating a bucket based on the requirement.
Ideally, a bucket should be created in the closest geographical region where the bucket is needed to be accessed. Choosing the closest region while creating a bucket optimizes latency while accessing the bucket, reduces costs, and complies with any regulatory requirements an organization may have.
Creating a Bucket
The following phases represents the process of creating a bucket using the AWS Management Console:
- Sign in to your AWS account and go to the S3 console or visit https://console. aws.amazon.com/s3/. If we already have any buckets in the account, it displays a list of the buckets or the following figure stating that we do not have any buckets in the account:
- Click on the Create bucket icon, as displayed in the following figure:
- Clicking on the Create bucket button, display a pop-up as shown in the figure. Enter a DNS compliant bucket name. The bucket name must be unique across all existing bucket names in S3. Since S3 is a shared service, likely, we may not always get the bucket name you want as someone might have already taken it.Select the appropriate region where you want to create the bucket from the dropdown menu as indicated in the following figure. If we already have some buckets, we can Copy setting from an existing bucket.
We can also click on the Create button if we do not want to follow the remaining steps. We need to set bucket properties and permissions later on if we directly click on the Create button. To understand these steps, we can click on the Next button:
- In the subsequent screen, as shown in the following figure, we can set the required properties. We can see in the screen that by default Versioning is Disabled, Logging is disabled, and there are no Tags.We can click on Versioning and Logging as required or add tags as needed. When we click on these items, it displays several pop-ups, as shown in the following figure. We can set the necessary properties as required:
- In the subsequent screen, as shown in the following figure, we can set folder permissions. We can set individual user permissions, manage public permissions, and manage system permissions:
- In the subsequent screen, as shown in the following figure, review our selection. If required, we can edit your choice under individual categories. After reviewing everything, click on the Create bucket button. It creates a bucket as per the input given by us: