Book Image

AWS Certified Solutions Architect ??? Associate Guide

By : Gabriel Ramirez, Stuart Scott
Book Image

AWS Certified Solutions Architect ??? Associate Guide

By: Gabriel Ramirez, Stuart Scott

Overview of this book

Amazon Web Services (AWS) is currently the leader in the public cloud market. With an increasing global interest in leveraging cloud infrastructure, the AWS Cloud from Amazon offers a cutting-edge platform for architecting, building, and deploying web-scale cloud applications. As more the rate of cloud platform adoption increases, so does the need for cloud certification. The AWS Certified Solution Architect – Associate Guide is your one-stop solution to gaining certification. Once you have grasped what AWS and its prerequisites are, you will get insights into different types of AWS services such as Amazon S3, EC2, VPC, SNS, and more to get you prepared with core Amazon services. You will then move on to understanding how to design and deploy highly scalable applications. Finally, you will study security concepts along with the AWS best practices and mock papers to test your knowledge. By the end of this book, you will not only be fully prepared to pass the AWS Certified Solutions Architect – Associate exam but also capable of building secure and reliable applications.
Table of Contents (26 chapters)
22
Mock Test 1
23
Mock Test 2

Resiliency

To build resilience, let's shut down and start up the web server to make sure that MySQL and Apache automatically start with the operating system. We first define the CURRENT_INSTANCE variable to make our commands easier, as follows:

CURRENT_INSTANCE=$(aws ec2 describe-instances --query 'Reservations[*].Instances[*].InstanceId' --filter 'Name=tag:Name,Values=WebServer' --output text)

aws ec2 reboot-instances --instance-ids $CURRENT_INSTANCE

Again, check phpinfo.php, to verify that it is still working. Now, issue a stop instance command, wait a few seconds, and start the instance again, as follows:

aws ec2 stop-instances --instance-id $CURRENT_INSTANCE
aws ec2 start-instances --instance-id $CURRENT_INSTANCE

If you try to reach the informational web page, 54.172.31.74/phpinfo.php, it will probably no longer be there. Why did this happen? Every time...