0% found this document useful (0 votes)
117 views4 pages

Capstone Project

This document outlines the steps to set up a web application infrastructure on AWS including: 1. Creating a MySQL RDS database within two private subnets and security groups. 2. Launching a Cloud9 IDE within a public subnet to install MySQL, HTTP server, and import data. 3. Creating an AMI of the Cloud9 instance and using it to launch an auto scaling group behind an application load balancer. 4. Configuring systems manager parameters for database credentials. 5. Testing the application load balancer URL to verify the web application is functioning properly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views4 pages

Capstone Project

This document outlines the steps to set up a web application infrastructure on AWS including: 1. Creating a MySQL RDS database within two private subnets and security groups. 2. Launching a Cloud9 IDE within a public subnet to install MySQL, HTTP server, and import data. 3. Creating an AMI of the Cloud9 instance and using it to launch an auto scaling group behind an application load balancer. 4. Configuring systems manager parameters for database credentials. 5. Testing the application load balancer URL to verify the web application is functioning properly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Capstone Project

Step 0: Inspect the architecture


 Inspect the example VPC. Inspect the subnets.
 Inspect the Security Groups. Inspect the AMI.
Open VPC – Private subnet1 ID and Private subnet2 ID (copy)
a. Pvt subnet1 -10.0.2.0/23
b. Pub subnet2 -10.0.1.0/24
c. Pvt. Subnet2 -10.0.4.0/23
d. Pub subnet1 -10.0.0.0/24
B) Check security groups: ALBSG, Bastion-SG, Example-DB, and Inventory-App

Step 1: Create a MySQL RDS database instance


with the following specifications.
a) Create a db subnet group – OPEN RDS another terminal
a. Create Subnetgroup / create DBsubnetgroup
/ Name – exampledbsubnetgroup
Desc – Example DB subnet group
VPC – Example DB
Available Zone – select 1a and give subnet – Privatesubnet1
Select 1b and give subnet – Privatesubnet2

CREATE SUBNET GROUP


b) Create RDS
a. Standard / MYSQL - Development MultiAZ
b. Database – Example
i. Username – admin
ii. Password – lab-password
iii. DB Instance class - Burstable t3.micro
iv. 20GB
v. Autoscaling – Enable
vi. VPC – Example|VPC
vii. Subnet – Select exampledbsubnetgroup
viii. public access - No
ix. VPC Security Group – Select ExampleDB
x. 3306 port
xi. Password Authentication
xii. dbname – exampledb
xiii. Enable backup
xiv. Disable monitoring
CREATE DB

Step 2: Create a Cloud9 IDE - open cloud9


 (Create – Project IDE
– t2.micro, Amazon Linux2,
 VPC – Example |VPC,
 subnet – public subnet2 and
 create (IAM Role – AWSServiceCloud9)

Step 2a: Install MySQL & HTTP web server on project ec2
$ sudo yum -y update
pg. 1
$ sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2

$ sudo yum install -y httpd mariadb-server


$ sudo systemctl start httpd

$ sudo systemctl enable httpd


$ sudo systemctl is-enabled httpd

Modify Security Group - ExampleDB


a. Add another 3306 port + SG (Web Access ) security group (Provide access to cloud9)

Step 2b: Get the Project Assets to project

A) Get project Resources ( copy link from the capstone project )

$ wget https://github.com/unix501/AWS-Capstone-
/archive/refs/heads/main.zip

$ wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-ACACAD-20-
EN/capstone-project/Example.zip

Extract the files to the Apache www folder:


$ sudo unzip main.zip
$ cd example
$ sudo mv * /var/www/html (Verify all files copied)

 Open port 80 from the security group of the Cloud9 EC2 instance (all IPv4)
 Get the cloud9 EC2 public instance IP address and test that you can access the website

EXAMPLE SOCIAL RESEARCH ORGANIZTION

Step 3 : Importing the data into the RDS database (Cloud9)


Importing the data into the RDS database cloud9
get the SQLDump file:
$ wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/ILT-TF-200-
ACACAD-20-EN/capstone-project/Countrydatadump.sql
Connect to the RDS database, run this command:
$ mysql -u admin -p --host <rds-endpoint> (Copy from RDS which we created)
Test that you can access the RDS DB
use exampledb;
show tables;
Import the data into the RDS database.
$ mysql -u admin -p exampledb --host <rds-endpoint> < Countrydatadump.sql
Verify the tables
$ mysql -u admin -p --host <rds-endpoint>
use exampledb;
show tables; (table – countrydata_final is displayed)
select * from countrydata_final; (To view all records on screen)
exit;
$

Step 4: Create AMI of Cloud9 Instance (Ensure fully configured and


communicate with mysql) - MyAMI

Step 5 : Create an Application Load Balancer

pg. 2
 Create target group – Name -applelb/ internetfacing / ipv4 / example |VPC / 1a –
pubsub1, 1b – pubsub2 / Security group – Delete default and add ALBSG / Create Listner
appgroup /

Creating Listener appgroup / instances / 80 / Example |VPC / Target group – appgroup /


Next / Don’t select anything / just create target group appgroup Create ELB

 Modify launch Template using created AMI - ExampleLT - MyAMI

 Create an auto scaling group – Launch template – ExampleLT (Modify the ami
parameters)/ Next / VPC – Example |VPC / AZ – Privatesubnet1,
privatesubnet2
/ next / LB – Attach to ELB /
o select appgroup|Http
o Healthchecks – select ELB Next
o Group Size – 2,2,4
o Policies – None Next Next
o Tags Name - key Value – Web Server Next

Step 6: Configure the system parameters in Parameter Store Systems Manager


On Cloud9 Web Server - /var/www/html/ verify the file get-parameters.php
Add the following parameters to the Parameter Store and set the correct values: Systems Manager / Parameters
(Tier Standard) / Create parameters .

/example/endpoint <endpoint> <string>


/example/username admin
/example/password lab-password
/example/database exampledb

Test the ALB


Go to ELB Copy DNS end point and verify web site (Web Site Launched successfully)
Select Query - Mobile Phones..

Submit - Congratulations

Before

pg. 3
pg. 4

You might also like