aws 유저 데이터는 EC2 인스턴스를 시작할 때 초기 설정을 자동화하기 위해 사용 하는 스크립트이다

활용 예시

아파치

#!/bin/bash
dnf update -y
dnf install -y httpd
systemctl restart httpd
echo "<h1>Hello from Apache on EC2</h1>" > /var/www/html/index.html
systemctl restart httpd

nginx

#!/bin/bash
dnf update -y
dnf install -y nginx
systemctl restart nginx
echo "<h1>Hello from nginx</h1>" > /usr/share/nginx/html/index.html
systemctl restart nginx