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
Under Prerequisite – Prepare template select Use a sample template.
In Select a sample template choose LAMP Stack under Simple from the drop down.
Click on Next.
Under Specify stack details:
Stack name: MyStack
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.
In Configure stack options let defaults be as is. Click on Next.
Review MyStack and click on Create stack.
The stack will initiate its events creation process.
Step 2: In MyStack, go to Outputs Tab and open the WebsiteURL.
A sample PHP page will open. This page gives detailed information about the Server that is created.
Step 3: In MyStack, The Templates tab gives access to the JSON document that can be further used for operations in this Server.
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.
Very helpful to understand the concept
Useful blog
very helpful
Easy to follow
Useful blog sir.