The Applied AI and Natural Language Processing Workshop
上QQ阅读APP看书,第一时间看更新

Core S3 Concepts

The S3 hierarchy includes the following concepts:

  • Type of data storage: S3 is a key-value store. You provide a unique key, and AWS stores your data as a value. You retrieve the data using the key.
  • Keys: The key is the name assigned to an object that uniquely identifies it inside a bucket. All objects in a bucket have one key associated with them.
  • Objects: Objects are what you store. They are not updatable: if you need to change one byte in the value, you will have to upload the entire object again.

Figure 1.3: Object storage using a unique key and myBucket

  • Bucket: Just like a folder, a bucket is a container where you store objects. Buckets are created at the root level and do not have a filesystem hierarchy. More specifically, you can have multiple buckets, but you cannot have sub-buckets within a bucket. Buckets are the containers for objects, and you can control (create, delete, and list objects in the bucket) access, view access logs, and select the geographical region where Amazon S3 will store the bucket.
  • Region: Region refers to the geographical region, such as us-central or ap-south, where S3 stores a bucket, based on the user's preference. The region can be selected when creating a bucket. The location should be based on where the data will be accessed the most. Overall, specific region selection has the biggest impact if S3 is used to store files for a website that's exclusively accessed in a specific geographic region.

    The object storage in a bucket with different forms is as follows:

Figure 1.4: Object storage

S3 Operations

The S3 API is quite simple, and it includes the following operations for the entity in question:

  • Bucket: Create, delete, and list keys in a bucket
  • Object: Write, read, and delete

Here's an example:

Figure 1.5: Object stored in myBucket