Exercise

Now, we will launch an m1.small instance and set up an Apache web server. Execute ApacheBench (ab) to perform a performance test, measure the results, and then change the underlying hardware to an m4.large instance, and compare both of the results.

For more information about the LAMP stack on an Amazon Linux image, follow the tutorial at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html.

We will be using the command-line interface because of its concise nature. The API action for EC2 is called RunInstances. It is advised that you familiarize yourself with the main API actions of every API of the AWS core services.

Instances are launched from an instance template, called a virtual image (or an Amazon Machine Image (AMI), in the Amazon lingo). These images follow an incremental approach, in which we add customization and bake another one to be reused, as follows:

Image versioning is a best practice for immutable infrastructures, where new releases can be upgraded via full system images (OS, technology stacks, and code) and quickly released into production or controlled environments. Images play a critical role in disaster recovery strategies, where you can replace services and applications at well-known points in time. Amazon Linux images are a good place to start, because these images are hardened, optimized for EC2, audited for repositories and system software (to improve security and stability), and production ready.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.12.140