CannotStartContainerError: API error (500): failed to initialize logging driver: failed to create Cloudwatch log stream: ResourceNotFoundException: The specified log group does not exist. status code: 400,

はじめに

fargateでタスクを登録し、起動させた時エラーが発生。原因と対処をまとめる

An error occurs when a task is registered and started with fargate. Summarize causes and actions

原因

CannotStartContainerError: API error (500): failed to initialize logging driver: failed to create Cloudwatch log stream: ResourceNotFoundException: The specified log group does not exist. status code: 400,

CloudWatch のロググループが存在しない

CloudWatch log group does not exist

対処

CloudWatchにロググループを作成する

Create a log group in CloudWatch

その後、再度タスクを実行すれば問題は解消できる。

After that, the problem can be solved by executing the task again.