- 新しい順
- 投票が多い順
- コメントが多い順
The reason for this error is in the "EC2_AVAIL_ZONE=${EC2_AVAIL_ZONE##* }" section.
As described in the following document, to avoid treating "${}" as a CloudFromtation function, use "! to prevent "${}" from being treated as a CloudFromtation function, as described in the following document.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html
So if you do the following, the error will be eliminated.
EC2_AVAIL_ZONE=${!EC2_AVAIL_ZONE##* }
Also, there is another part "echo "127.0.0.1 assist-${run_env}${srv_num}.ithor${tenant}.aws.myhealth.com" >> /etc/hosts", but if "${run_env}", "${srv_num }" and "${tenant}" are not CloudFormation functions, you need to add "!" as well. must be added as well.
The following changes would be a good idea.
echo "127.0.0.1 assist-${!run_env}${!srv_num}.ithor${!tenant}.aws.myhealth.com" >> /etc/hosts
関連するコンテンツ
- AWS公式更新しました 3年前