liveBook · Manning

Amazon Linux

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

Amazon Linux 2 is an AWS-provided Linux operating-system distribution.

Amazon Linux is an AWS-provided Linux distribution for EC2 virtual machines. Amazon Linux 2 is an optimized distribution used to install web-application software such as Apache, PHP, and WordPress. section 2.1

Keep Amazon Linux 2 updated because vulnerabilities can affect the kernel, libraries, runtime environments, and applications. Critical and important security updates install automatically during startup through cloud-init; additional updates require an explicit strategy. section 5.2

Common update approaches include:

  • Run yum -y update in EC2 user data to install all updates during boot. section 5.2
  • Run yum -y --security update to install security updates during boot. section 5.2
  • Use AWS Systems Manager Patch Manager with a patch baseline and scheduled maintenance windows for continuous patching. section 5.2
Instance:
  Type: 'AWS::EC2::Instance'
  Properties:
    # [...]
    UserData: !Base64 |
      #!/bin/bash -ex
      yum -y update    #1

Apply a complete update automatically by placing yum -y update in an EC2 instance's user-data script. section 5.2

Load-balanced WordPress deployment

Run Apache, PHP, and WordPress on at least two EC2 instances using Amazon Linux. An Application Load Balancer distributes traffic, while RDS for MySQL stores database data and EFS shares application files between instances. section 2.1

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains the distribution’s deployment role and operational patching options, but does not detail operating-system internals.
Examples
Uses a load-balanced WordPress deployment and yum-based EC2 user-data scripts as concrete examples.
What it assumes
Assumes basic familiarity with EC2 and web applications while introducing Amazon Linux as an installable operating-system choice.
What you can do after
Operate/configure EC2 web servers with Amazon Linux and choose boot-time or Systems Manager-based patching approaches.
How it connects
Connects Amazon Linux with EC2, Apache, PHP, WordPress, Application Load Balancer, RDS, EFS, and Systems Manager Patch Manager.

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.