티스토리 뷰

I 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.

Ref) Settings of CLI

Ref) Region name

$ 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.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함