AOSNote-Projects-Assignments
Note:
# Assignment-1 [Static Website Hosting]
# user data for hosting thru github repo link
#!/bin/bash
sudo su
yum update -y
yum install -y httpd git
cd /var/www/html
git clone https://github.com/Narian318/nn-aosnote-assignment-1.git
cp -r nn-aosnote-assignment-1/* /var/www/html
rm -rf nn-aosnote-assignment-1
systemctl enable httpd
systemctl start httpd
#Static Website Hosting on EC2 (Apache/httpd) through s3 bkt
#!/bin/bash
sudo su
yum update -y
yum install httpd -y
cd /var/www/html
wget https://nn-aosnote-assignment-1.s3.amazonaws.com/mole.zip
unzip mole.zip
cp -r mole-main/* /var/www/html
rm -rf mole-main mole.zip
systemctl enable httpd
systemctl start httpd
# S3 Bucket Policy
{
"Version": "2012-10-17",
"Id": "GetObjectPolicy",
"Statement": [
{
"Sid": "GetObjectStatement",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::nn-aosnote-assignment-1/*"
}
]
}
ndfvdsmfg
jfdsds
fdsfbksg
Note: