Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Create a Custom AMI in AWS

The AMIs provided by AWS contain little more than just the operating system. So to run a PHP web application, for example, you would need to install Apache and PHP. This can be done automatically using User Data, or with an automation tool like Chef or Puppet. Doing it that way extends the wait time to instance "readiness." Many applications, such as those in an autoscaling environnemt, need instances ready to use immediately. By creating custom AMIs we can lauch pre-configured instances and skip the wait. Note: For Windows PuTTY ssh connections to EC2 instances, see: https://linuxacademy.com/blog/linux/connect-to-amazon-ec2-using-putty-private-key-on-windows/ or https://www.youtube.com/watch?v=bi7ow5NGC-U For information on using the Cloud Playground, see: https://support.linuxacademy.com/hc/en-us/articles/360019096651-Cloud-Playground-FAQ#how_connect ** Please reference the updated commands provided in the Objectives section.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 23, 2025
Duration
1h 0m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Launch a Configuration Instance

    Launch an instance from a Base AWS Linux AMI:

    • Login to the Management Console
    • Launch EC2 instance using the AWS Linux AMI:
      • t2.micro
      • Public IP
      • Create a Security Group with SSH (TCP 22) an HTTP (TCP 80) access
      • Download a Key Pair
  2. Challenge

    Install Apache and PHP

    SSH to the instance and execute the following commands to install Apache and PHP: (Windows users see: https://www.youtube.com/watch?v=bi7ow5NGC-U for using PuTTY for SSH)

    • sudo yum update -y
    • sudo yum install -y httpd php
    • sudo systemctl start httpd
    • sudo systemctl enable httpd

    Create a PHP page with the following commands:

    • sudo usermod -a -G apache ec2-user
    • sudo chown -R ec2-user:apache /var/www
    • echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php

    To display the PHP Info page, open a web browser to: [Your EC2 Instance's Public IP]/phpinfo.php

  3. Challenge

    Create a Custom AMI

    In the EC2 Management Console, create an image from the config instance:

    • Select the instance in the console
    • Under the Actions menu, choose Create Image:
      • Name the Image
    • Launch an instance from the new Image by going under "MyAMI's"
    • Configure the new instance's details as before.
    • Verify the PHP page displays in the browser as before (you can use your existing SG that you created).
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight