In this, we will learn the basics of Amazon Simple Storage Service (Amazon S3).

Buckets –

  • It is a container for objects stored in Amazon Simple Storage Service (Amazon S3).
  • Every object is contained in a bucket.
  • URL addressing, as if object named photos/puppy.jpg stored in johnsmith bucket, then URL is http://johnsmith.s3.amazonaws.com/photos/puppy.jpg
  • Buckets helps to
    • organize the S3 namespace at the highest level
    • identify the account responsible for storage and data transfer charges
    • play a role in access control
    • serve as the unit of aggregation for usage reporting.
  • Buckets can create in a specific region.
  • Can also configure a bucket every time an object is added to it
  • S3 generates a unique version ID and assigns it to the object.
Rules for naming S3 buckets in all AWS Regions:
  • Bucket names must be unique across all existing bucket names in Amazon S3.
  • Bucket names must comply with DNS naming conventions.
  • Thirdly, Bucket names must be at least 3 and no more than 63 characters long.
  • Bucket names must not contain uppercase characters or underscores.
  • Then, Bucket names must start with a lowercase letter or number.
  • Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.
  • Bucket names must not format as an IP address (for example, 192.168.5.4).
  • When you use virtual hosted–style buckets with Secure Sockets Layer (SSL), the SSL wildcard certificate only matches buckets that don’t contain periods. To work around this, use HTTP or write own certificate verification logic. We recommend that you do not use periods (“.”) in bucket names when using virtual hosted–style buckets.

Objects –

  • Fundamental entities stored in Amazon Simple Storage Service (Amazon S3).
  • Consist of object data and metadata.
  • Data portion is opaque to Amazon S3 or stored as it is.
  • Metadata is a set of name-value pairs that describe the object and include
    • the date last modified
    • standard HTTP metadata – Content-Type
  • Can specify custom metadata at the time the object is stored.
  • An object is uniquely identified within a bucket by a key (name) and a version ID.

Keys –

  • Unique identifier for an object within a bucket.
  • Every object in a bucket has exactly one key.
  • Every object in Amazon S3 can uniquely address as
    • Combination of a bucket, key, and version ID uniquely identify each object
    • web service endpoint, bucket name, key, and optionally, a version.
  • Example, in the URL http://doc.s3.amazonaws.com/2006-03-01/AmazonS3.wsdl, “doc” is the name of the bucket and “2006-03-01/AmazonS3.wsdl” is the key.
Regions
  • You can choose the geographical region where S3 will store the buckets you create.
  • Choose a region to
    • optimize latency
    • minimize costs
    • address regulatory requirements
  • Objects stored in a region never leave the region unless you explicitly transfer them to another region.
S3 Operations
  • S3 API has operations
  • Create/Delete a bucket
  • Write an object
  • Read an object
  • Delete an object
  • List keys in a bucket

REST Interface Usage

  • Native interface for S3
  • Uses standard HTTP or HTTPS requests to create and delete buckets, list keys, and read and write objects.
  • Maps standard HTTP methods to CRUD operations as
    • Create is HTTP PUT (at times POST);
    • Read is HTTP GET;
    • Delete is HTTP DELETE;
    • Update is HTTP POST (at times PUT).
  • Can also interact with S3 by AWS SDKs for iOS, Android, JavaScript, Java, .NET, Node.js, PHP, Python, Ruby, Go, and C++, the AWS CLI and the AWS Management Console.

S3 Data Durability and Availability

  • Durability answers “Whether my data still be there in the future?” 
  • Availability answers “Can I access my data right now?”
  • Offers both for data.
  • S3 standard storage designed for 99.999999999% durability and 99.99% availability of objects over a given year.

S3 Data Consistency

  • Extremely consistent system
  • data automatically replicates across multiple servers and locations within a region,
  • changes in data may take some time to propagate to all locations
Menu