0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【CodePipeline】エラー対処法: unexpected error: The container <container-name> does not exist in the task definition.

Posted at

CodePipelineで以下のようなエラーがでた場合の対処法について。

The ECS service cannot be updated due to an unexpected error: The container does not exist in the task definition.

image.png

##エラー内容
問題が発生してECSをアップデートできない。taskdefinitionの中に指定されたコンテナ名がないとの指摘。

##原因
appspec.ymlファイルで指定したcontainer nameが間違っている(stgのコンテナ名を指していた。)

##対処法
appspec.ymlのcontainer nameを修正して完了。

下記のContainerName: "sample-website"の部分。

appspec.yml
version: 0.0
Resources:
  - TargetService:
      Type: AWS::ECS::Service
      Properties:
        TaskDefinition: <TASK_DEFINITION>
        LoadBalancerInfo:
          ContainerName: "sample-website"
          ContainerPort: 80
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?