Capstone PGPCC AWS PDF

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

Project Title

Deploying an Online Doctor’s Clinic Application on


Cloud

KHOUATRA SALAH EDDINE


Services Used:

Service Name Purpose Region Notes


AWS S3 Storing Application Global Storage of app
source code files source
AWS EC2 Hosting Healthcare us-east-1 Hosting health
application (zone 1b and 1c care app as
for HA) highly available
app across
multiple zones
AWS CloudFront CDN for Global Global Static content
distribution of static Distribution
website content globally for
performance
AWS Route53 DNS Attach domain name Us-east-1 Route custom
to APIs domain url to
Application

 Note: Route53 was not fully configured or tested because of the requirement for
custom domain purchase.

 Hosting of Application Source Code can be achieved via multiple ways


o Public Source control systems – Github/Bitbucket –
 Updating source code with public source control systems is the most
straight forward way.
o S3 Bucket
 We can host our application source in S3 bucket as well
o Custom AMI – The issue with this is that updating source code will be a challenge
 For this assessment perspective, we will be using AWS S3 bucket
 Create a S3 bucket with no public access and upload application source code to it
o
Create Launch Configuration
 Create new Launch Configuration
o User Data for EC2 Configuration
 sudo yum update -y
 sudo yum install -y https
 sudo yum install git
 sudo systemctl start http
 sudo systemctl enable httpd
 sudo chmod 0777 /var/www/html
 S3 – Primary

 unzip healthcare.zip -d /var/www/html/
 GIT - OPTIONAL
 git clone

 cp capstone-aws-healthcare/* /var/www/html/

 Create Launch configuration from an existing EC2 Instance

 Create VPC – name it as capstone-hc-vpc



 Create Subnets in the newly create VPC
 2 Public Subnets

 2 Private Subnets

o
 Enable Auto-assigning of public IP for Public Subnets alone
o
 Till this time, there’s no difference between the subnets create (public vs private)
 Next step is to make the public subnets publicly accessible, for this we’d need to create
an internet gateway for our VPC
 Create Internet Gateway
o
 Attach Internet gateway to our VPC
 Next we’d need to setup traffic rules for our internet gateway, for this we’d need to
create Two Routing tables .
 Create Public and Private Route Table
o Create a route table
o Add a route to internet for our internet gateway
o
o Next, in order to make our Subnets publicly accessible, we’d need to associate
them to the Public Route Table

 Similarly, Add Private subnets to private route table


o
o For Private route table, there wont be any route to internet but only local route
 Create Security Groups for Incoming Traffic
 Security Group 1 – Allows Incoming HTTP traffic to Load Balancer

 Security Group 2 – Allows Traffic from Load Balancer



 Create Launch Configuration
o Choose the AMI created in STEP #1
o Choose Instance Type as T2.Micro (or others as suited)
o Choose Security Group as – “capstone-hc-autoscale-sg”
o
 Create AutoScaling Group – Highly available
o Choose Launch configuration created in previous step
o Select custom VPC that we created earlier
o Select private subnets for high availability
o Don’t attach load balancer at this time.
o Setup Capacities
 Desired – 2
 Minimum – 1
 Maximum – 4
o
o
 Create a Load Balancer for public Access
o Load Balancer would also require a Target Group, next we will need create
Target Group

o
o Create Load Balancer


 Select our VPC created in previous steps
 And Associate LB with public subnets in each availability zones

 Assign the load balance Security Group for Load Balancer
 And assign listeners to the target group in load balancer

 Associate Auto Scaling group to Target Group

 At this time point, let’s make sure that the Target Groups is healthy

 Create new hosted zone in Route53


 Configure CloudFront for global distribution –

 With this our Highly available healthcare app is up and running across multiple edge
locations
 Edge locations are selected as part part of cloud front distribution creation
o

You might also like