#!/bin/bash
yum update -y
yum upgrade -y
yum install --allowerasing -y jq curl wget unzip

curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

yum install -y httpd
systemctl enable --now httpd

aws s3 cp s3://버킷 이름/web/v2.tar /home/ec2-user
tar -xf /home/ec2-user/v2.tar -C /home/ec2-user/
mv /home/ec2-user/v2/* /var/www/html/
rm -rf /home/ec2-user/v2*

image.png

image.png