Wednesday, April 26, 2023

AWS_S3

 S3 (Simple Storage Service):
Storage can be divided into different categories :
                        S3
                        EBS
                        EFS
                        Glacier
Organizing, Storing and Retrieving data in Amazon S3.

S3 is Object level Storage. and Objects are stored in S3 Bucket.
Bucket : A flat structure that is segmented into single repositories known as Bucket.
Objects are stored as Key, Value pair.
S3 is Global specific.

S3 Components:
            Buckets
            Objects
The purpose of s3 is storage.
S3  It is a storage service that provides an interface that you can use to store any amount of data, at any time, from anywhere in the world.

With S3 you pay only for what you use and the payment model is pay-as-you-go.
Default Snapshots are stored in S3 bucket.
        Max Size of S3 bucket size is 5TB and Min size of S3 Bucket size is 0 Bytes.
        Max Single Object size is 160 GB.
        Per Region we will create 100 Buckets.
        27*100 = 2700 Buckets are available in one AWS account.
        Each Bucket has the Storage limit is 10 TB.
        2700*10 =27000 TB space available in one AWS account.

A user creates a Bucket, That Bucket stores Objects in the Cloud
All the Objects(Data) are stored in Bucket. (There is no limit to store the Objects in Bucket).
S3 Storage classes can be configured at the Object level
S3 mainly focused on Get, Put, List, Delete Operations. Because bucket operations work 
Note :- default snapshots are stored in S3 buckets

Buckets can be in one of three states:
        1. Unversioned (the default)
        2. Versioning-enabled
        3. Versioning-suspended

There are 4 types of Storage Classes in S3 :
        1.  Standard ( Frequently Access) --- it is Default storage class.
        2.  Standard IA(Infrequent Access) ---3 Months/ 6 Months/…etc.
        3.  Reduced Redundancy yearly once or once in every two years.
        4.  Glacier --- used for Backup

Control Entry Points for S3 Bucket:-
  1. S3 Access Point.
  2. S3 Bucket Policies.
  3. ACL.
  4. IAM.
Two ways that you can Secure the access to your S3 buckets,
  1. ACL – Access Control List
  2. Bucket polices 
Encrypt the data in S3 by using the below methods,
  1. Server Side Encryption – S3 (AES 256 encryption)
  2. Server Side Encryption – KMS (Key Management Service)
  3. Server Side Encryption – C (Client Side) 
S3 Types are :-
            S3 Standard
            S3 Intelligent-Tiering
            S3 Standard-IA
            S3 OneZone-IA
Three types of Retrieval for S3 Glacier:
    Expedited → 1–5 min of a retrieval request.
    Standard retrieval → 3–5 hours of a retrieval request.
    Bulk retrieval → 5–12 hours of a retrieval request.

Versioning provides the ability to recover from unintended user actions and application failures.
Note : The SOAP API does not support S3 Versioning
KMS is a Key Management System scaled for the cloud, and we can use it to encrypt our Amazon S3 Objects.
Eg :- When we encrypt some images at rest in Amazon S3, but the company doesn’t want to spend time managing and rotating the keys, although this company wants to control who can access those keys. What should a solutions architect use KMS to accomplish this

storage option for a service that provides offsite backups for different devices and has to support millions of customers, in which the images will be retrieved infrequently but must be available for retrieval immediately 
Q : An application processes stored images on S3 using AWS Lambda to add graphical elements. The processed images need to be available for users to download for 30 days, after which we can delete them. Processed images can be easily recreated from original images. The Original images need to be immediately available for 30 days and be accessible within 24 hours for another 90 days.
Ans :- Objects archived to S3 Glacier Instant Retrieval and S3 Glacier Flexible Retrieval are charged for a minimum storage duration of 90 days, and S3 Glacier Deep Archive has a minimum storage duration of 180 days.
Interview Question :
What is AWS S3 
Storage classes in S3 
How AWS S3 works? 
How to Control Access to s3 
What is S3 intelligent tiering 
What are Lifecycle policies? 
What is Amazon s3 replication? 
What is the S3 bucket policy?  
What is Bucket ACL 
What is a storage lens?

Thread

Native Thread Demon Thread Non-Demon Thread Native Thread: - Any Method/Thread which is mapped to OS is called Native Thread or Method. Demo...