==================== AWS Cloud Bootcamp ==================== Pre-Requisites : Linux Basics Duration : 10 days workshop Timings : 7:30 AM - 9:00 AM IST (mon-sat) ========= Syllabus ========= 1) What is infrastructure ? 2) On-Prem Infrastructure Challenges 3) Cloud Computing 4) Advantages with Cloud Computing 5) AWS Introduction 6) AWS Services Tour 7) Regions & AZs 8) EC2 + Load Balancer 9) S3 10) RDS 11) IAM 12) Beanstack 13) Lambdas 14) Route 53 (DNS) ======================== What is Infrastructure? ======================== => Resources required to run our business. IT Infrastructure : 1) Machines 2) Servers 3) Databases 4) Storage 5) Network 6) Power 7) Security 8) Backup 9) Monitoring => We can deal with IT infrastructure in 2 ways 1) On-Prem infrastructure 2) Cloud Infrastructure => On-Prem infrastructure means we need to purchase everything and manage everything on our own. => We have to deal with below challenges when we go for on-prem infrastructure 1) Lot of investment 2) Scalability 3) Availability 4) Security 5) Storage 6) Monitoring => To overcome the challenges with On-Prem infrastructure, companies are moving to cloud computing. ========================== What is Cloud Computing ? ========================== => The process of delivering IT resources over the internet on demand basis is called as Cloud Computing. => Cloud Computing works based on pay as you go model. => We have below advantages with cloud computing 1) Pay as you go 2) Scalability 3) Availability (24/7) 4) Unlimited Storage 5) Security 6) Backup & Restore 7) Monitoring =============== Cloud Provider =============== => The company which is providing IT infrastructure based on "pay as you go" model. 1) Amazon => AWS 2) Microsoft => AZURE 3) Google => GCP 4) Salesforce ===================== Cloud Service Models ===================== 1) IAAS : Infrastructure as a service 2) PAAS : Platform as a service 3) SAAS : Software as a service ========== AWS Cloud ========== => AWS stands for Amazon Webservices. => Amazon company started AWS cloud in 2006. => Today 190+ countries using AWS cloud services => Instead of we are puchasing, managing and maintaining infrastructure simply we can use AWS cloud infrastructure. => AWS providing services based on pay as you go model. => AWS having global infrastructure using Regions & Availability Zones. => We can create free tier account (1 year validity) => In AWS cloud we have 200+ services (some are free and some are paid) => If we use paid service in AWS, bill be generated. Note: in AWS, bill amount auto-deduction will not happen. If we don't pay bill amount aws will suspend our account. Note: As a beginner we can request AWS support team to get free credits. ============= AWS Services ============= EC2 : Elastic Compute Cloud => Virtual Servers S3 : Simple Storage Service => Unlimited Storage RDS : Relational Database Service => RDBMS IAM : Identity and Access Management => Users, Groups & Roles VPC : Virtual Private Cloud => Network Route 53 : DNS => Domain Mapping EKS : Elastic Kubernetes Service => K8s Cluster Beanstack : Platform as a service Lambdas : Serverless computing => Run application without thinking abt server =========== Assignment =========== @@ Reference video : https://youtu.be/GSu1g9jvFhY?si=7VVcaxkZZw_WKWsC Step-1 : Create Mysql DB using AWS RDS Step-2 : Check DB connection with workbench Step-3 : Develop application to connect with RDS DB. Step-4 : Delete RDS database instance. ===== EC2 ===== => EC2 means elastic compute cloud => It is used to create virtual machines in aws cloud EC2 instance = server/machine/vm/instance => EC2 is a paid service => Minimum billing period for EC2 instance is 1 hour. 9:15 AM - 9:30 AM ===> 1 hour 9:45 AM - 10:00 AM ===> 1 hour => For practice purpose we can use "t2.micro/t3.micro" instances for 1 year (monthly 750 hours free of cost). => To create EC2 instance we will use below resources 1) AMI (OS) 2) Instance Type (configuration) 3) Key Pair (.pem) 4) VPC (networking) 5) Security Group (firewall rules) 6) EBS (storage) => Windows Machines will run on RDP protocol and Linux machines will run on SSH protocol. RDP => 3389 SSH => 22 ============ Assignment ============ => Deploy SpringBoot application in EC2 Linux VM and access that using browser in windows machine. @@ Reference video : https://www.youtube.com/watch?v=cRQPgbwOWq0 ====================== What is Web server ? ====================== => Web Server is a software which is used to run web applications. => Web applications are divided into 2 types 1) static web application 2) dynamic web application => The web app which is giving same response for every user is called as static web application. Note: To run static websites we can use "httpd" as a webserver. => The web app which is giving response based on user is called as dynamic web application. Note: To run dynamic website we can use "apache tomcat" as webserver. ============================================= Hosting static website using amazon linux vm ============================================= Step-1 : Create EC2 VM with amazon linux ami Step-2 : Connect with EC2 VM using SSH Client Step-3 : Install "HTTPD" webserver to run static websites Step-4 : Setup webpages (html files) Step-5 : Enable http protocol with 80 port number in SG inbound rules. Step-6 : Access website using EC2 VM public ip in our browser. ------------------------------------- sudo su yum install httpd -y service httpd start cd /var/www/html vi index.html ------------------------------------- Website URl : http://public-ip/ -------------------------------------- ===================== What is user data ? ===================== => It is used to execute the script while launching EC2 VM. Note: User data will execute only once when the machine is started. #! /bin/bash sudo su yum install httpd -y cd /var/www/html echo "

Welcome to AWS Cloud

" > index.html service httpd start ============= Assignment ============= => Setup a static website using "nginx" web server using EC2 Linux VM. ======================= What is Load Balancer ======================= => When we run our application in single server then we have to face below challenges 1) One server should handle all reqs 2) Burden will increase on server 3) Response will be delayed for clients 4) Server can crash 5) Single Point Of Failure 6) Business Loss => To avoid above problems, we will run our application using "Load Balancer". => Load Balancer is used to distribute load to multiple servers in round robbin fashion. => We have below advantages with Load Balancer 1) App will run in multiple severs 2) Load will be distributed 3) Burden will be reduces on servers 4) Fast Performance 5) High Availability => We have 4 types of load balancers in aws 1) Application Load Balancer 2) Network Load balancer 3) Gateway Load Balancer 4) Classic Load balancer (previous generation) ======================= Load Balancer Lab Task ======================= #### Step-1) Create EC2 VM-1 with below user data #! /bin/bash sudo su yum install httpd -y cd /var/www/html echo "

Life Insurance Server - 1

" > index.html service httpd start #### Step-2) Create EC2 VM-2 with below user data #! /bin/bash sudo su yum install httpd -y cd /var/www/html echo "

Life Insurance Server - 2

" > index.html service httpd start ### Step-3) Add these 2 instances to one "Target Group" ### Step-4) Create Load Balancer with Target Group (ALB) Schme : Internet Facing select target group we have created ### Step-5) Access our aplication using LBR DNS URL ============= Auto Scaling ============= => Auto scaling is used to increase or decrease no.of servers based on incoming traffic. scale up -> increase the servers when required scale down -> decrease the servers when not required => We have below advantages with auto scaling 1) high availability 2) fault tolerance 3) cost management -------------------------------------------- 1) What is EC2 2) How to launch Windows VM and RDP client 3) How to launch Linux VM and SSH client 4) Static website hosting 5) Security groups (inbound rules) 6) Load Balancer with Target Group 7) Auto Scaling 8) Types of IPs --------------------------------------------- =========== S3 Service =========== -> Simple Storage Service -> Unlimited storage -> S3 supports object based storage Object = file (txt, pdf, audio, video, img, excel) -> In S3, objects will be stored using bucket concept one bucket = collection of objects Note: When we upload object into bucket it will generate one URL for every object. -> Bucket versioning : Maintain multiple versions of same object (file) -> Object Lock : Give only read permissions ================================= Static website hosting using S3 ================================= 1) Create a bucket in s3 with unique name 2) Upload website files as objects in the bucket 3) Go to bucket properties and enable static website hosting. index file : index.html error file : error.html 4) Access our static website using Website Endpoint url. Note: Static website URL will be length, we can map it to domain name using Route 53. =========== Assignment =========== => Develop a web application with below fields in the form. Name : text field Email : text field Phno : text field Resume : - select file - Note: When we submit the form resume should be uploaded into AWS s3 bucket as a object and store name, email, phno, resume_url in database table. ===== IAM ===== => Identity and Access Management in AWS Cloud. => Using this IAM service, we can manage users and user permissions in AWS cloud. => In AWS cloud, we can have 2 types of users 1) Root user 2) IAM user => Root user is a powerful user, we can access everything in aws cloud using root user login. Note: We shouldn't use root account for daily activities in the project. => For daily activities we will use IAM user account. => For IAM user we can manage permissions (limited access). => We can access AWS cloud services in 2 ways 1) Console Access - username - password 2) Programmatic Access - Access key - Secret Access key 1) IAM User 2) IAM Group (set of users) 3) IAM Policies (permissions for user or group) 4) IAM Roles (service to service communication) Note: IAM is a free service in AWS. ======== AWS RDS ======== => Relational database service => It is fully managed service in AWS. Ref Video : https://youtu.be/GSu1g9jvFhY?si=kla0T7i7iFXMjW6Y =============== AWS Route 53 =============== Ref Video : https://www.youtube.com/watch?v=ruxNLQWtyCw ================== Elastic Beanstack ================== => End to end web application management service. => It provides platform as a service (PaaS). => AWS will provide ready made platform to run our application when we go for Beanstack. Note: Upload your code and run your application, aws will take care of infrastructure and platform to run your application. ======================================= Dynamic Web App - Deployment process ======================================= 1) Create Network (VPC) 2) Create Security Groups 3) Enable Inbound Rules 4) Create EC2 Instances 5) Install Required Softwares to run the code Ex : Java, Tomcat, IIS 6) Create Load Balancer 7) Setup Auto Scaling Group for High Availability 8) Deploy our application code ### Note: When we use "AWS Elastic Bean stack " services then first 7 steps will be taken by Elastic Bean stack. We are responsible for only application deployment. ================================ Elastic Beanstack Pricing Model ================================ => There is no additional charge for Elastic Beanstalk. => We need to pay for the resources which are created by bean stack. Ex: EC2 instances, S3 buckets, LBR, ASG etc... ================================ Lab Task on Elastic Beanstack ================================ Step-1) Create IAM Role with below 3 policies - AWSElasticBeanstalkMulticontainerDocker - AWSElasticBeanstalkWebTier - AWSElasticBeanstalkWorkerTier Ex : Role Name : ashokit_beanstack_role Step-2) Create Application using Beanstack Step-3) Create Environment for the application by choosing required Runtime. Ex: Java or Python or Dot Net Note: Once environment is created it will generate DNS to access our application. ==================================== Uploading Java SpringBoot Web App ==================================== => Take jar file of java springboot web app => Go to Elastic Beanstack environment and upload your jar and give version number for your application Ex: v1.0 => Go To enviornment Properties and set SERVER_PORT as 5000 Ex : SERVER_PORT = 5000 - Select Environment - Go to Configuration - Edit "Updates, monitoring, and logging" option - Set Environment Property and apply => After environment got re-started, we can access our application by using DNS url. ============== AWS Lambdas ============== => Lambdas are used for serverless computing. => Serverless computing means Run your code without thinking about servers. Note: When we deploy our application using aws lambdas then AWs will take care of servers to run our application. => Lambdas works based on "pay as you use" model. Note: If code is executed then only bill will be generated. If code is not executed then bill will not be generated. =============================== Making AWS Bill amount as zero ================================ => Go to support => Select Account & Billing => Select Consolidated Billing => Create Case => Provide subject and description subject : Please waive off my bill amount description : Hi Team, Greetings for the day.. I am new to aws cloud and i am exploring aws services for learning purpose by mistake i have used some paid services. Could you please waive off my bill amount and please provide me some free credits for practice. Thankyou. => Use chat now option Note: AWS support team member will join for chatting.