Posted By

chrisaiv on 03/18/17


Bash EC2

Versions (?)

Bash: EC2 Script

 / Published in: Bash

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.

  1. #!/bin/bash
  2. # Install Apache using yum package manager
  3. yum install httpd -y
  4. # Update yum
  5. yum update -y
  6. # Copy files from AWS S3 to Apache's web directory
  7. aws s3 cp s3://YOURBUCKETNAMEHERE/index.html /var/www/html/
  8. # Start Apache server
  9. service httpd start
  10. # Check the Apache server configuration
  11. chkconfig httpd on

Report this snippet  

You need to login to post a comment.