AWS Solution Project - 1
AWS Solution Project - 1
AWS Solution Project - 1
Step1: Create VPC to isolate the network We create a VPC with both public and private subnets. The
web server is hosted in the public subnet, so that it can reach the public Internet. The DB instance is
hosted in a private subnet. The web server is able to connect to the DB instance because it is hosted
within the same VPC, but the DB instance is not available to the public Internet, providing greater
security. Choose VPC Dashboard. To begin creating a VPC, Now click on Create VPC
VPC dashboard select Subnet and then create two subnet public and private
Create a Internet Gateway for the VPC so that it will be able to access the internet or connect to the
outer world. In the Dashboard go to the Internet Gateway and click on Create Internet Gateway and
name it as edurekagateway and click on create Internet Gateway.
Now attach the Internet Gateway to VPC go the internet gateway in dashboard and then select the
gateway you have created and click on attach VPC
Now create a route table and attach it to the VPC, go to dashboard and select route table and click
on create route table, now provide the name public and private and select theVPC we have created
from the dropdown list and then click on the create .
After Creating the routing tables edit the routes and provide destination as 0.0.0.0/0 and attach
Internet Gateway to Public route table so that it will be able to access the internet.
Now select the route table and go to subnet association for associating or attaching the subnet to
the route table and click on Save. Create a NAT Gateway On the dashboard click on the NAT Gateway
and create a Gateway with the public subnet
Now click on Create NAT Gateway and give name of the NAT Gateway and select the public subnet
from the drop down and also allocate an elastic IP .
Now click on Create NAT Gateway. Edit the private route table and update it with attaching NAT
Gateway too it so that it can also access the internet through public subnet.
Execute the React application code using AWS Elastic Beanstalk. Ensure that the source code of Web
application is automatically picked, pushed to the master branch, and deployed on the servers To
create an example application ▪ Open the Elastic Beanstalk ▪ Optionally add application tags ▪ For
Platform, choose a platform, and then choose Create application. ▪ Creates an Elastic Beanstalk
application named reactapp ▪ Launches an environment named reactapp -env with these AWS
resources: o An Amazon Elastic Compute Cloud (Amazon EC2) instance (virtual machine) o An
Amazon EC2 security group o An Amazon Simple Storage Service (Amazon S3) bucket o Amazon
CloudWatch alarms o An AWS CloudFormation stack o A domain name ▪ . ▪ Creates a new application
version named Sample Application. This is the default Elastic Beanstalk example application file. ▪
Deploys the code for the example application to the reactapp -env environment.
Now in order to Deploy new code, the following steps can be followed ▪ On the environment
overview page, choose Upload and deploy. ▪ Choose Choose file, and then upload the sample
application source bundle thatyou downloaded.
Choose Deploy.
To ensure that the source code of Web application is automatically picked, pushed to the
master branch, and deployed on the servers we can use code commit
Code commit now enables you to restrict who can commit changes to the master branch or
➢ Clean up
➢ Ensure all the UI images served to the frontend application code are provisionedvia
In order to ensure all the UI images served to the frontend application code are provisioned
1. Create S3 Bucket
2. Upload files to the S3 Bucket
3. Make the Bucket Public So we can grab the images
4. Find the URLs for your files by clicking on the bucket name,
5. then selecting a single file and showing the properties.
There should be enough backups for both the Web and Database server, so if the setup crashes, we
can launch a new one from the disaster recovery backups. Enable Automated Backups for your
Database Instances through the console. To enable automated backups immediately
1. Sign in to the AWS Management Console and open the Amazon RDS console at
https://console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases, and then choose the DB instance that you want to
modify.
4. For Backup Retention Period, choose a positive nonzero value, for example 3 days.
5. Choose Continue.
7. On the confirmation page, choose Modify DB Instance to save your changes and enable
automated backups
Backups for your Web service may include creating snapshots of the instance or creating an Image
of the Instance.
They are uncertain about the traffic pattern that how low or high it can be, so they want the Web
application to be running on at least two EC2 instances all time, and when there is a high load, they
must burst up to four instances in total In order to control uncertain traffic auto scaling can be used.
Create Launch Configuration: a. Create an image of the instances , in EC@ dashboard , choose launch
configuration and click on it, Now in AMIs, select the AMI you have create and give name for your
project, click on add storage and click on next b. Add the same security group which is been assigned
to the instance c. Now, click on the launch configuration Create an Auto Scaling group a. Click on
Create auto scaling group b. Give name for your Group c. Select the VPC which has been created and
choose the public subnet inside it. d. Click on create auto scaling group ➢ The Web application
should be highly available, even if any VM fails to respond to queries, there should be a mechanism
to switch the connection to another healthy VM automatically. This can be achieved through Load
Balancer
Create Load Balancer a. Create an application on ELB and name it. b. Add existing security group c.
Assign auto scaling group to the load balancer d. Test the Load Balancer by giving the
public_IP/webpageurl in URL. ➢ Automate the download all the activity logs into a CSV file, create a
stream ofdata, analyse it, and display it via a dashboard ➢ Follow the steps to achieve this. In the
Elastic BeanStalk console, you will find the option to enable cloud watch, ( Elastic Beanstalk-> Create
application->configure more options). Now click on enable monitoring. Then go to Cloudwatch and
Create a dashboard to view and analyze the logs. ➢ The Web application should also be cached
globally, so users worldwide can accessit with low latency Deliverables: Create a CloudFront
distribution to cache our application globally. Navigate to your CloudFront and click on create
distribution Under web section click on get stared On the Create Distribution page, under Origin
Settings, choose the ELB that you created earlier Give the original path as project.php Keep the rest
as defaults and create a distribution Once your distribution is created, you will be able to see your
website through your domain name of your distribution Check whether your infrastructure is
working or not by terminating one of your instances, so that a new instance gets created by your
auto scaling group and a mail should be sent to the subscribed e-mail ID through SNS