Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
AWS Certified Solutions Architect ??? Associate Guide

You're reading from   AWS Certified Solutions Architect ??? Associate Guide The ultimate exam guide to AWS Solutions Architect certification

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789130669
Length 626 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Stuart Scott Stuart Scott
Author Profile Icon Stuart Scott
Stuart Scott
Gabriel Ramirez Isaias Ramirez Melgarejo Gabriel Ramirez Isaias Ramirez Melgarejo
Author Profile Icon Gabriel Ramirez Isaias Ramirez Melgarejo
Gabriel Ramirez Isaias Ramirez Melgarejo
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Introducing Amazon Web Services 2. AWS Global Infrastructure Overview FREE CHAPTER 3. Elasticity and Scalability Concepts 4. Hybrid Cloud Architectures 5. Resilient Patterns 6. Event Driven and Stateless Architectures 7. Integrating Application Services 8. Disaster Recovery Strategies 9. Storage Options 10. Matching Supply and Demand 11. Introducing Amazon Elastic MapReduce 12. Web Scale Applications 13. Understanding Access Control 14. Encryption and Key Management 15. An Overview of Security and Compliance Services 16. AWS Security Best Practices 17. Web Application Security 18. Cost Effective Resources 19. Working with Infrastructure as Code 20. Automation with AWS 21. Introduction to the DevOps practice in AWS 22. Mock Test 1
23. Mock Test 2
24. Assessment 25. Another Book You May Enjoy

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime