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

Implementing and Scaling a LAMP App in Lightsail

In this learning activity, we will implement a LAMP stack on a single Lightsail instance and then migrate it to a scalable full-tier architecture. The goal of the learning activity is to gain experience with: * Creating a LAMP Lightsail instance * Creating a Lightsail managed database instance using MySQL * Reconfiguring a LAMP application to use the Lightsail managed database * Cloning a front-end application server * Scaling an application front end * Adding a load balancer to distribute incoming load

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

Contact sales

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

    Create the managed database, load balancer, and LAMP instance.

    Create a LAMP Instance

    1. Make sure the region is set to us-east-1.
    2. Select the LAMP (PHP 5) blueprint.
    3. Select the 2 GB instance plan.
    4. Name the instance PHP-fe-1.

    Create a Lightsail Database Instance

    1. Ensure the region is set to us-east-1.
    2. Pick the default MySQL version.
    3. Check the box next to Specify Login Credentials and enter your credentials. Use the password taskstasks.
    4. Select the High Availability plan.
    5. Select the 2 GB instance size.
    6. Name the database todo-db.

    Create a Lightsail Load Balancer

    1. Ensure the region is set to us-east-1.
    2. Name the load balancer todo-lb.
  2. Challenge

    Configure and deploy the application on a single instance.
    1. Log in to the PHP-fe-1 instance using SSH.
    2. Follow the steps listed at https://github.com/linuxacademy/aws-lightsail-deep-dive/blob/master/Scenario3/learning_activity_3/1_fe_monolith_commands.sh.
    3. Complete the application installation at http://INSTANCEIP/install.php.
    4. Verify that the application is functional at http://INSTANCEIP.
    5. Create the task remember to buy a cat.
  3. Challenge

    Migrate the application to the managed database instance.
    1. Log in to the PHP-fe-1 instance.
    • Complete the database migration steps up to and including line 24 at: https://github.com/linuxacademy/aws-lightsail-deep-dive/blob/master/Scenario3/learning_activity_3/2_migrate_to_managed_db.sh
    • Create the database tables on the managed database instance using http://INSTANCEIP/install.php.
    • Verify the application's functionality at http://INSTANCEIP.
    • Complete the database migration steps from line 28 onwards at https://github.com/linuxacademy/aws-lightsail-deep-dive/blob/master/Scenario3/learning_activity_3/2_migrate_to_managed_db.sh
    • Verify the application at http://INSTANCEIP. You should see the remember to buy a cat task.
  4. Challenge

    Scale and load balance the front-end tier.
    1. Create a snapshot of the PHP-fe-1 instance.
    • Use the snapshot to create two additional instances: PHP-fe-2 and PHP-fe-3.
    • Verify that both new instances function at http://INSTANCEIP.
    • Attach PHP-fe-1, PHP-fe-2, and PHP-fe-3 to the todo-lb load balancer.
    • Navigate to the DNS endpoint of the load balancer and ensure it functions correctly. Refresh the page and make sure that the IP address changes between front end servers.
    • Stop two instances and ensure that there is no service interruption.
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