티스토리 뷰
Solution : "An error occurred (TargetNotConnected) when calling the StartSession operation: {instance-id} is not connected."
RyanGomdoriPooh 2022. 1. 20. 11:53I have a problem accessing Instance through Session Manager in AWS.
That message is "An error occurred (TargetNotConnected) when calling the StartSession operation: {instance-id} is not connected.".
In this post, We deal with how to solve this problem.
We entered a command similar to the command below at the local terminal of Mac.
aws ssm start-session --target i-123456 --document-name AWS-StartSSHSession --parameters 'portNumber=8373'
We got this error message.
An error occurred (TargetNotConnected) when calling the StartSession operation: i-123456 is not connected.
It has two solutions about the error mentioned above.
Eventually, Solutions has common reason. Link
First of all, We have to check settings for "Session Manager".
Let's check steps of solution.
1. Check instance settings of "Session Manager" to be connected.
Ref) Settings of Session Manager
2. Check instance settings of "Session Manager" to connect.
$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
And then, try again this command.
aws ssm start-session --target i-123456 --document-name AWS-StartSSHSession --parameters 'portNumber=8373'
From now, We can access instance using by Session Manager.
'AWS' 카테고리의 다른 글
AWS RDS Proxy를 활용한 Aurora Failover 구현하기 (2) | 2020.06.18 |
---|---|
AWS S3 Bucket 마이그레이션 하기 (서로 다른 계정 간) (2) | 2019.09.07 |
RDS MySQL 한글이 깨질 때는 어떻게 할까? (0) | 2019.08.25 |
AWS Region , Availability Zone , Edge Location 이란? (0) | 2017.06.02 |
S3 URL 접근 방식 (3) | 2016.11.29 |