================================= AWS S3 (Simple Storage Service) ================================= -> S3 is a storage service in AWS cloud. -> S3 supports unlimited storage. -> Using S3 we can store any amount of data from anywhere at anypoint of time. -> S3 supports object based storage (files) One Object = file Note: We can store any type of file in s3 Ex: .txt, .mp4, .png, .jpeg, .doc, .pdf, .xls ...... -> In S3, we need to create buckets to store objects (files) Note: In one bucket we can store group of objects. Note: Every bucket should have unique name. -> When we create a bucket, end-point url will be generated to access bucket. -> When we upload object into bucket, every object will get its own end-point url. Note: By default, buckets and objects are private (we can them as public). ========================= Realtime Usecases of S3 ========================= 1) Application files (images, audios, videos, docs...) 2) Database backup files 3) EBS Volume Snapshots (EC2 VM backup) 4) Server log files =============== S3 Lab Task =============== 1) Create Bucket 2) Upload Object into bucket 3) Access Object using Object URL ============ Versioning ============ => It is used to maintain multiple variants of same file. => By default versioning will be disabled for S3 bucket. => As versioning is disabled, when we upload file again with same name then it will override old file. => If we don't want to replace old objects from bucket then we can enable Versioning. => Versioning we will enable at bucket level and it is applicable at object level. ================ Object Locking ================ -> It is used to enable the feature WORM (Write once read many times) model. -> We can enable object lock on versioning enabled buckets. -> Object Lock will be enabled at bucket level and it is applicable at object level. NOte: If we enable object locking then versionining will be enabled by default. ================================= What is Transfer Accelaration ================================= => It is used to speed up data transfer process in s3 bucket. => When we enable Transfer Accelaration it provides endpoint url to upload the data to s3 bucket quickly. Note: If we enable Transfer Accelaration bill will be generated. Janmabhoomi (6 hrs, 300 RS) Hyd -----------------------------------> Vijayawada Vande Bharat (3 hrs, 1000 Rs) Hyd -----------------------------------> Vijayawada =================== S3 Storage Classes =================== => Storage classes are used to specify how frequently we want to access our objects from S3. => At the time of uploading object into S3 bucket we can select storage class for that object. => We have several storage classes in s3 like below.. 1) Standard (default) : To access object more than once in a month with in milli seconds access. Example: Websites, mobile applications, gaming data, and big data analytics 2) Intelligent Tiering : Unknown access patterns Example : Machine learning datasets, IoT sensor data, and financial records with fluctuating access needs 3) Standard-IA : Infrequent Accesed Data (Only once in month) Example: Backup data, disaster recovery, and long-term storage for critical business data. 4) One Zone-IA : Stored in single availability zone (once in a month) Example: Secondary backups, easily re-creatable data, or internal reports 5) Glacier Instant Retrieval : Long Live Archieve Data (once in quarter -> Milli Seconds) Example: Medical images, media assets, and regulatory compliance records. 6) Glacier Flexible Retrieval : Once in a year (Minutes to Hours) Example: Historical logs, legal documents, and long-term digital preservation 7) Glacier Deep Archieve : Less Than once in a year (Hours to download) Example : Compliance archives, government records, and old media backups ================================= Static Website Hosting using S3 ================================= -> Website nothing but collection of web pages. Ex: login page, regiter page, services, about-us page, contact-us page... -> Websites are divided into 2 types 1) static website 2) dynamic website -> The website which gives same response/content for all users is called as static website. -> The website which gives response based on user is called as Dynamic website. => Static websites we can deploy in 2 ways 1) Create EC2 Linux VM and Install HTTPD Webserver and Deploy 2) Deploy using S3 bucket ----------------------------------------------------------------------------- Step-1 : Create S3 bucket with unique name Step-2 : Upload website files and folders into bucket with public read access. Step-3: Enable Static website hosting (in bucket properties) index-document : index.html error-document : error.html Note: After enabling static website hosting, it generates end-point URL for our website. Step-4: Access our website using website endpoint url. ------------------------------------------------------------------------------- =============== AWS S3 Limits =============== => By default we can create upto 100 s3 buckets per aws account. However we can request AWS support team to increase the limit. => Individual object size can be upto 5TB. Note: For uploading large object we can use multipart upload. Note: In one bucket we can upload unlimited objects.