1 個回答
- 最新
- 最多得票
- 最多評論
0
the error is happening because the /etc/init directory does not exist in ec2. add a mkdir /etc/init before the cat <<EOF > in your userdata.
#!/bin/bash
echo ECS_CLUSTER=my-cluster >> /etc/ecs/ecs.config;echo ECS_BACKEND_HOST= >> /etc/ecs/ecs.config;
export PATH=/usr/local/bin:$PATH
yum -y install jq
yum install -y awscli
aws configure set default.region ap-northeast-1
**mkdir /etc/init**
cat <<EOF > /etc/init/spot-instance-termination-notice-handler.conf
已回答 10 個月前
相關內容
- 已提問 1 年前
- 已提問 6 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前