rm -rf im-sprint-practice-deploy/
클론했던 디렉토리 전체를 삭제하고 다시 Deploy를 실행해서 해결함.
appspec.yaml
파일의 hook
에 BeforeInstall
작성hooks:
BeforeInstall:
- location: scripts/beforeInstall.bash
scripts/beforeInstall.bash
파일 추가#!/bin/bash
# I want to make sure that the directory is clean and has nothing left over from
# previous deployments. The servers auto scale so the directory may or may not
# exist.
if [ -d /home/ubuntu/im-sprint-practice-deploy/ ]; then
rm -rf /home/ubuntu/im-sprint-practice-deploy/
fi
mkdir -vp /home/ubuntu/im-sprint-practice-deploy/
출처