
https://www.youtube.com/watch?v=rVy458rTSxs



sudo dnf install -y httpd
sudo systemctl enable --now httpd
sudo dnf install -y amazon-efs-utils
sudo mkdir -p /mnt/efs/html
sudo mount -t efs -o tls fs-0abb92d259df204e4:/ /mnt/efs/html
# 재시작 시 자동 mount
sudo vi /etc/fstab
fs-0abb92d259df204e4:/ /mnt/efs/html efs _netdev,tls,nofail 0 0
sudo vi /etc/httpd/conf/httpd.conf

#
DocumentRoot "/mnt/efs/html/lambda"
#
# Relax access to content within /var/www.
#
<Directory "/mnt/efs/html">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/mnt/efs/html/lambda">




def lambda_handler(event, context);
context = "Hello from Lambda + EFS"
with open("/mnt/efs/index.html", "w") as f:
f.write(context)


