top of page

LAMP Stack using CloudFormation Template

  • Writer: Parag
    Parag
  • Nov 16, 2020
  • 1 min read

Updated: Jul 29, 2021

Create LAMP Stack using CloudFormation Template


Objectives:

1. Learn to model and provision AWS cloud infrastructure.

2. Learn to manage and maintain AWS Infrastructure as code.



Step 1: In AWS console go to CloudFormation click on Create stack

ree

Under Prerequisite – Prepare template select Use a sample template.

ree

In Select a sample template choose LAMP Stack under Simple from the drop down.

ree

Click on Next.

ree

Under Specify stack details:

Stack name: MyStack

ree

Parameter:

DBName: MyDatabase1

DBPassword: myadmin123

DBRoot Password: myroot123

DBUser: MyAdmin

InstanceType: t2.micro

KeyName: [Select your AWS EC2 Key Pair]

SSHLocation: 0.0.0.0/0

Click on Next.

ree

In Configure stack options let defaults be as is. Click on Next.

Review MyStack and click on Create stack.

ree

The stack will initiate its events creation process.


Step 2: In MyStack, go to Outputs Tab and open the WebsiteURL.

ree

A sample PHP page will open. This page gives detailed information about the Server that is created.

ree

Step 3: In MyStack, The Templates tab gives access to the JSON document that can be further used for operations in this Server.

ree

Delete the Stack if you no longer need it. This will also delete all the resources that were created along with it.


Was this document helpful? How can we make this document better. Please provide your insights. You can download PDF version for reference.



bottom of page