Skip to content

Instantly share code, notes, and snippets.

@ShubhamRasal
Created December 6, 2020 11:12
Show Gist options
  • Save ShubhamRasal/4fde914829d1a592f6c7f3285c91a8c4 to your computer and use it in GitHub Desktop.
Save ShubhamRasal/4fde914829d1a592f6c7f3285c91a8c4 to your computer and use it in GitHub Desktop.
ssm send-command
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--parameters commands=["sudo yum install httpd git -y,
sudo systemctl start httpd,
sudo systemctl enable httpd,
sudo mkfs.ext4 /dev/xvdf/ /var/www/html ,
sudo rm -rf /var/www/html/*,
sudo git clone https://github.com/creatorsbyheart/creatorsbyheart.github.io.git /var/www/html/ ,
sudo systemctl restart httpd "]
--targets "Key=instanceids,Values=<instance-id>"
--comment "Configure webserver and deploy website"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment