0
2

CodePipelineによるCI/CDパイプライン構築で詰まった箇所

Last updated at Posted at 2024-08-11

起きたエラー

AWSのコンソールに以下の文字が出力される。
「error code: ecs_update_error; error message: the ecs service cannot be updated due to an unexpected error: the container backend did not have a container port 80 defined. (service: amazonecs; status code: 400; error code: invalidparameterexception; request id: addae102-e782-4dc8-aa60-35bd40c4b3bb; proxy: null). check your ecs service status」

80番ポートは開いていないよ。
という意味。

原因

port80.png
バックエンドでNestJSを使用していることをすっかり忘れていた。
NestJSのデフォルトポートは3000番。
80でなく3000を指定する。

正しくはこう書く

appspec.ymlの間違い.png

buildspec.ymlの誤り

buildspec.ymlの間違い.png

taskdef.jsonの誤り

taskdef.jsonの間違い.png

tags[]が残っているとエラーが出力される。

lock sequence entries are not allowed in this context at line 22
忘れずに消す。

0
2
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
2