(Amazon Linux 2 より前の) Amazon Linux AMI プラットフォームで、Elastic Beanstalk のマルチDocker 環境をECSを使って構築する。
BuildしたDockerイメージをECRにプッシュした際に、以下のようなエラーが発生。
ECS Application sourcebundle validation error: We expected a VALUE token but got: START_OBJECT
結論から言うと、Dockerrun.aws.jsonのcommand
プロパティが配列である必要があるが、Stringになっていた。
以下を参照のこと。
Weaponizing Haskell - Part Two: Deployment ~ Bows and Arrows
抜粋
One of the main issues I had was that my command property for one of my services was a string, but it should have been an array. Docker-Compose allows this, but Dockerrun doesn’t. I ended up reading the ECS Task-Definition Parameters manual with much more scrutiny and realized my mistake. Part of why it took me so long to do so was because of the misleading error message.