Create Launch Template

Create Launch Template

  1. In the left navigation pane (scroll down) under Instances, click Launch templates.

  2. Click the Create launch template button.

  3. In the Launch template name and description section:

  • Launch template name: Enter LT1
  • Leave other options as default
  1. In Launch template contents:
  • Select Amazon Linux from Quick Start
  • Amazon machine Amazon (AMI): Select Amazon Linux 2023 AMI
  1. In the Instance type section: Select t2.micro from the list below LT

  2. Key pair (Login): Select Keep it as default

  3. Security groups: Select Web-1 from the list LT

Leave all other options as default. Expand the Advanced details option, Go to User data and paste the script below:

#!/bin/bash

sudo su

yum update -y
yum install -y httpd

systemctl start httpd
systemctl enable httpd

echo "<html> <h1> Hello, this is my First Workshop!! </h1> </html>" > /var/www/html/index.html

LT

  1. To create, click the Create launch template button. After successful creation, it will create Launch template.