S3 buckets and objects

S3 organizes the data that we store in it using two concepts: buckets and objects. An object is the equivalent of a file, that is, a blob of data with a name, and a bucket is equivalent to a directory. Every bucket has its own URL of the form http://s3.<region>.amazonaws.com/<bucketname>.

In the URL, <bucketname> is the name of the bucket and <region> is the AWS region where the bucket is present, for example eu-west-2. The bucket name and region are set when we create the bucket.

Bucket names are shared globally among all S3 users, and so they must be unique. If you own a domain, then a subdomain of that will make an appropriate bucket name.

Objects are named when we first upload them. We access objects by adding the object name to the end of the bucket's URL as a path. For example, if we have a bucket called mybucket in the eu-west-2 region containing the object Python.png, then we can access it by using https://s3.eu-west-2.amazonaws.com/mybucket/Python.png.

Let's create our first bucket through the AWS Console. We can perform most of the operations that the API exposes manually through this web interface, and it's a good way of checking that our API client is performing the desired tasks:

  1. Log into the console at https://console.aws.amazon.com.
  2. Go to the S3 service. You will see a page, which will prompt you to Create bucket.
  3. Click on the Create bucket button.
  4. Enter a bucket name, pick a region, and then click on Create:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset