AWS session manage
SSM を使って、リモートホストにポートフォワードする
Fargate は最新のバージョンを使っていれば特に設定は不要で ssm agent がインストールされている
権限周り
EC2 にアクセスする場合、ssm の権限を持つ role を ec2 に紐づける必要がある
For Amazon Elastic Compute Cloud (Amazon EC2) instances, permissions are provided by an instance profile. An instance profile passes an IAM role to an Amazon EC2 instance.
ユーザーのアクセス権限を制御
ECS を踏み台サーバーにする場合