Sunday, July 11, 2021

AWS: Storage: S3 (Simple Storage Service)

It is Simple Storage Service for the internet; which is highly scalable, fast & inexpensive data storage. 

  • Buckets: Container for the objects to be stored in S3

  • Objects: Fundamental entities stored in S3 buckets consist of Object data & metadata. An object is uniquely identified within a bucket with ‘Bucket + Key (name) + Version ID’

  • Keys: Unique identifier of the object within a bucket

  • Regions: Geographical AWS region

  • S3 Data Consistency Model: 

    • Consistent read: read-after-write for PUTS of new objects (there will be latency)

    • Eventual consistency: GET -> create -> GET; third GET might not return the Object

    • Atomic updates: returns old data or updated data but never partial or corrupt data

    • Data propagation: It may take some time to replicate the changes across S3 servers (high availability); old data might be returned in such case


  • Storage classes: STANDARD, STADARD_IA (Infrequent Access) & S3 Glacier (long term archival)

  • Bucket policies: Add or deny permissions for objects within a buckets (policy) + IAM

Making Requests: S3 dual-stack endpoints supports requests to S3 buckets over IPv4 & IPv6, using AWS SDK and REST APIs.

Buckets: By default, you can create 100 buckets & increase it up to 1000 for an account. Default region is us-east (N Virginia). Bucket created by a user is owned by an account of the user, NOT by the user.

Bucket Naming: 3 to 63 chars,  lowercase, numbers, hyphens & dots; must begin & end with letter or number, must not be formatted as IP address (192.168.xx.xx), must be unique within partition i.e. group of regions (at present there are 3 partitions aws (general), aws-cn (china) & aws-us-gov(us gov cloud)). If you include dots in naming, you will not be able to user virtual-host-style addressing over HTTPS, unless you perform your own certificate validation (hence dot is not recommended).

Transfer Accelerate: enables fast, easy & secure transfer of files over long distances (using CloudFront’s edge locations).

Storage Classes: Following tables compares storage classes 

Storage class

Designed for

Durability

Availability

Avail. Zone

Min. storage duration

Min billable object size

Other considerations

S3 Standard

Frequently accessed data

100.00%

99.99%

>= 3

None

None

None

S3 Standard-IA

Long-lived, infrequently accessed data

100.00%

99.90%

>= 3

30 days

128 KB

Per GB retrieval fees apply.

S3 Intelligent-Tiering

Long-lived data with changing or unknown access patterns

100.00%

99.90%

>= 3

30 days

None

Monitoring and automation fees per object apply. No retrieval fees.

S3 One Zone-IA

Long-lived, infrequently accessed, non-critical data

100.00%

99.50%

1

30 days

128 KB

Per GB retrieval fees apply. Not resilient to the loss of the Availability Zone.

S3 Glacier

Long-term data archiving with retrieval times ranging from minutes to hours

100.00%

99.99% (after you restore objects)

>= 3

90 days

40 KB

Per GB retrieval fees apply. You must first restore archived objects before you can access them. For more information, see Restoring Archived Objects.

S3 Glacier Deep Archive

Archiving rarely accessed data with a default retrieval time of 12 hours

100.00%

99.99% (after you restore objects)

>= 3

180 days

40 KB

Per GB retrieval fees apply. You must first restore archived objects before you can access them. For more information, see Restoring Archived Objects.

RRS (Not recommended)

Frequently accessed, non-critical data

99.99%

99.99%

>= 3

None

None

None


Object Versioning: Needs to be enabled explicitly, by default it is disabled. Enabling versioning on existing buckets is applicable only for new objects, existing objects in the bucket will remain unchanged. When you DELETE an object, all versions remain in the bucket and Amazon S3 inserts a delete marker and delete marker become the current version of the object and GET request will receive 404 Not Found. Or you can delete the object permanently by specifying the version ID to be deleted.

Lifecycle Management: Set of rules that defines the actions for S3 group of objects. Two types of actions – Transition Actions and Expiration Action. Transition cannot be done from any storage class to the Reduced Redundancy storage class.

Batch Operations: You can use S3 Batch Operations to perform large-scale operations on S3 objects. 

Notifications: S3 enables you to receive the notification in certain events on your bucket. The notifications can be sent to following destinations SNS (Topic), SQS (Queue) & Lambda (CloudCode).

Replications: Automatic, async copying of the objects; Encrypted and Glacier storage objects cannot be replicated.


No comments:

SpringBoot: Features: SpringApplication

Below are a few SpringBoot features corresponding to SpringApplication StartUp Logging ·          To add additional logging during startup...