Amazon S3 is an reliable, scalable, online object storage that stores files.
- Bucket: A bucket is a container in Amazon S3 where the files are uploaded. Files are stored in buckets. We need at least one bucket to store the files.
- Bucket name has to be unique because it is shared by all users.
- Buckets can't have nested buckets but can have nested directories.
- Maximum of 100 buckets can be created in a single account.
- There is no size limit on buckets.
- We can't rename a bucket once created.
- Buckets can be accessed via HTTP URLs as follows.
- http://<BUCKET_NAME>.s3.amazonaws.com/<OBJECT_NAME>
- http://s3.amazonaws.com/<BUCKET_NAME>/<OBJECT_NAME>
- Buckets can be managed via
- REST-Style HTTP Interface
- SOAP Interface
- The access logging feature if enabled, keeps track of bucket requests such as request type, resources accessed, date and time when requested.
- Object: An object is a file on Amazon S3. Each object is assigned a unique identifier. Every object is stored in a bucket. Objects consist of data and metadata.
- Objects can be managed via
- REST-style HTTP Interface
- SOAP Interface
- Objects can be downloaded via
- HTTP GET Interface
- BitTorrent protocol
- Every object is assigned a key as an identifier and is unique.
- Objects can be added to a folder in either of two ways
- Add Files option - Individual files can be uploaded using this option.
- Enable enhanced uploader - This option is used when we need to upload whole folders.
- There are two options under Set Details section on files.
- Use Reduced Redundancy Storage - Non critical data can be set to use reduced redundancy storage. Using this will store the file at lower levels of redundancy compared to standard storage class.
- Use Server Side Encryption
- This is for security. Data is encrypted while storing. When object is accessed, Amazon S3 decrypts the data.
- Use server side encryption has two options.
- Use the Amazon S3 service master key
- Use an AWS Key Management Service master key
- Key: A key is a unique identifier for an object within the bucket. Combination of bucket, key and version ID uniquely identifies each object.
- Region: We might want to choose the geographical region where Amazon S3 will store buckets.
- Folder: The folders in Amazon S3 are S3 files that are used to put Amazon S3 objects together under one group. This is analogous to Directory.
- Versioning: Versioning helps us to retrieve old objects. We can retrieve deleted and updated objects. When an object is deleted, Amazon S3 inserts a delete marker rather than deleting it permanently.
- Versioning is enabled at bucket level.
- Versioning can be enabled in any of the following states.
- Unversioned - the default
- Versioning enabled
- Versioning suspended.
- By default, when versioning is enabled Amazon S3 stores all versions of an object.
- To control the limit of versions, enable "Lifecycle rules" for the object. These rules will delete the old files.
- Data consistency Model: S3 provides eventual consistency for read-after-write.
- If we make a GET request to an object after an update request, we might get old data if update is not complete, else we will get latest data.
- S3 would return old data or updated data but will never return partial data.
- Amazon S3 provides high consistency by replication data across multiple servers.
- If a PUT request is successful, data is safely stored across multiple servers.
- If changes have to be made to a file, the change has to be replicated across all locations and this will take time. Any GET request during this time period might return old data until change is fully propagated.