Created
June 9, 2022 05:09
-
-
Save chandradeoarya/6712178830c8e7700a02fd6f81630838 to your computer and use it in GitHub Desktop.
SSM Run command YAML template which will install Apache on an EC2 instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
schemaVersion: '2.2' | |
description: YAML template which will install Apache on an EC2 instance | |
parameters: | |
InitialWebText: | |
type: "String" | |
description: "Initial message" | |
default: "Welcome to instance " | |
mainSteps: | |
- action: aws:runShellScript | |
name: configureApache | |
inputs: | |
runCommand: | |
- 'sudo yum update -y' | |
- 'sudo yum install -y httpd' | |
- 'sudo systemctl start httpd.service' | |
- 'sudo systemctl enable httpd.service' | |
- 'echo "{{InitialWebText}} $(hostname -f) , running Apache, installed with AWS Systems Manager" > /var/www/html/index.html' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment