Return to Snippet

Revision: 80648
at March 23, 2020 17:55 by chrisaiv


Updated URL
https://www.chrisjmendez.com/2017/03/18/bash-ec2-script/

Updated Code
https://www.chrisjmendez.com/2017/03/18/bash-ec2-script/

Updated Description
https://www.chrisjmendez.com/2017/03/18/bash-ec2-script/

Revision: 71834
at March 18, 2017 03:40 by chrisaiv


Initial Code
#!/bin/bash
# Install Apache using yum package manager
yum install httpd -y
# Update yum
yum update -y
# Copy files from AWS S3 to Apache's web directory
aws s3 cp s3://YOURBUCKETNAMEHERE/index.html /var/www/html/
# Start Apache server
service httpd start
# Check the Apache server configuration
chkconfig httpd on

Initial URL


Initial Description
This script is designed for AWS EC2 manager interested in installing an apache server, then  copying web page files from an AWS S3 bucket to Apache's web directory.

Initial Title
Bash: EC2 Script

Initial Tags
Bash

Initial Language
Bash