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?

【aws】ECSコンテナ(Fargate)への接続について

Last updated at Posted at 2025-10-20

概要

  • ECSコンテナ(Fargateタイプ)への接続方法を備忘録として記す

前提条件

  • 使用している端末:Mac (14.6.1)
  • ECSのコンテナタイプ:Fargate

接続手順

1. ecs execの有効化

  • 対象のコンテナのecs execが有効化されていないとlocalから接続できない為、有効化する
$ aws ecs update-service --cluster <cluster name> --service <service name> --enable-execute-command

2. コンテナの再起動

  • コンテナを再起動させないと有効化が反映されない為、再起動する

3. コンテナへ接続

  • 以下コマンドにて接続する
$ aws ecs execute-command --cluster <cluster name>  --task <task arn> -container <container name> --command "/bin/bash" --interactive

感想

  • 接続出来てしまえばどうってことないのに相変わらずこんなところで...(以下略)忘れないように。。

追加の備忘録

  • ※ECSのイメージによって入っているコマンドが異なるので、どのコマンドが入っているかを確認すること
$ dpkg -l

参考資料

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?