Instance Connect Console
Failed to connect to your instance Error establishing SSH connection to your instance. Try again later.

ECS ํด๋Ÿฌ์Šคํ„ฐ์˜ EC2 ์šฉ๋Ÿ‰ ๊ณต๊ธ‰์ž๋ฅผ ํ†ตํ•ด ์˜คํ† ์Šค์ผ€์ผ๋ง ๊ทธ๋ฃน(ASG)์œผ๋กœ ํ”„๋ผ์ด๋น— ์„œ๋ธŒ๋„ท์— ์‹คํ–‰๋œ EC2 ์ธ์Šคํ„ด์Šค์— EC2 Instance Connect ์—”๋“œํฌ์ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์—ฐ๊ฒฐ์— ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค. AWS ๋ฌธ์„œ์— ๋”ฐ๋ฅด๋ฉด, Amazon ECS-optimized Linux AMIs๋Š” ec2-instance-connect ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•˜๋ฉฐ ์ตœ์‹  Amazon Linux ๋ฒ„์ „์—๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ํฌํ•จํ•˜๊ณ  ์žˆ๋‹ค๊ณ  ๋‚˜์™€์žˆ์ง€๋งŒ Amazon ECSโ€optimized AMI(al2023-ami-ecs-hvm-2023.0.20241031-kernel-6.1-arm64)์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์„ค์น˜๋œ ํŒจํ‚ค์ง€๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค.

Terminal
$ yum list installed | grep ec2 amazon-ec2-net-utils.noarch 2.5.1-1.amzn2023.0.1 @System cloud-init-cfg-ec2.noarch 22.2.2-1.amzn2023.1.12 @System dracut-config-ec2.noarch 3.0-4.amzn2023.0.2 @System ec2-utils.noarch 2.2.0-1.amzn2023.0.1 @System grub2-efi-aa64-ec2.aarch64 1:2.06-61.amzn2023.0.12 @System $ sudo dnf install ec2-instance-connect -y $ sudo cat /etc/ssh/sshd_config | grep AuthorizedKeysCommand AuthorizedKeysCommand /opt/aws/bin/eic_run_authorized_keys %u %f AuthorizedKeysCommandUser ec2-instance-connect $ sudo dnf --releasever=latest update -y

Amazon ECS Optimized AMI์˜ ์‚ฌ์šฉ์ž ๋ฐ์ดํ„ฐ๋กœ ec2-instance-connect ํŒจํ‚ค์ง€ ์„ค์น˜ํ•˜๊ธฐ

ECS ํด๋Ÿฌ์Šคํ„ฐ์˜ ์˜คํ† ์Šค์ผ€์ผ๋ง ๊ทธ๋ฃน์—์„œ EC2 ์ธ์Šคํ„ด์Šค๋ฅผ ์‹คํ–‰ํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ์‹œ์ž‘ ํ…œํ”Œ๋ฆฟ์˜ ์‚ฌ์šฉ์ž ๋ฐ์ดํ„ฐ ์Šคํฌ๋ฆฝํŠธ๋กœ EC2 Instance Connect ์—”๋“œํฌ์ธํŠธ ์—ฐ๊ฒฐ์„ ์œ„ํ•œ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Instance Connect Console
$ sudo dnf list installed | grep ec2 amazon-ec2-net-utils.noarch 2.5.1-1.amzn2023.0.1 @System cloud-init-cfg-ec2.noarch 22.2.2-1.amzn2023.1.12 @System dracut-config-ec2.noarch 3.0-4.amzn2023.0.2 @System ec2-instance-connect.noarch 1.1-19.amzn2023 @amazonlinux ec2-instance-connect-selinux.noarch 1.1-19.amzn2023 @amazonlinux ec2-utils.noarch 2.2.0-1.amzn2023.0.1 @System grub2-efi-aa64-ec2.aarch64 1:2.06-61.amzn2023.0.12 @System

์ฐธ๊ณ  ๋งํฌ