Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

posted at

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

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
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?