Erro : EC2 Instance Connect endpoint

0

I have an EC2 instance with (OS) Debian 11 installed and I'm having problems connecting using the EC2 Instance Connect endpoint where it shows the error

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

I made all the necessary settings like:

  • IAM (user)
  • Permissions ( user )
  • Endpoints
  • instance region
  • Choice of AMI id
  • Instance type ( t2.micro )
  • Key Pair
  • VPC id
  • sub net id
  • Security Group Id

Below is the configuration of permissions to establish connection with the instance, in Json format, and also follows the rules defined for SSH connection:

Custom Permission

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "EC2DescribeInstances",
            "Action": [
                "ec2:DescribeInstances",
                "ec2:DescribeInstanceConnectEndpoints"
            ],
            "Effect": "Allow",
            "Resource": "*"
        },
        {
            "Sid": "EC2InstanceConnect",
            "Action": [
                "ec2-instance-connect:SendSSHPublicKey",
                "ec2-instance-connect:OpenTunnel",
                "ec2-instance-connect:SendSerialConsoleSSHPublicKey",
                "ec2:CreateInstanceConnectEndpoint",
                "ec2:CreateNetworkInterface",
                "ec2:CreateTags",
                "iam:CreateServiceLinkedRole"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

Rules ( Security Group )

... IPv6 HTTP TCP 80 Custom ::/0 – ... IPv4 HTTPS TCP 443 Custom 0.0.0.0/0 ... IPv6 HTTPS TCP 443 Custom ::/0 ... IPv4 SSH TCP 22 Custom 177.16.108.18/32 ... IPv4 HTTP TCP 80 Custom 0.0.0.0/0

0v0 ( I don't know if OS Debian 11 is compatible with the EC2 Instance Connect endpoint, maybe that's why the error is happening, thanks to anyone who can help me ).

asked 10 months ago432 views
1 Answer
1

It looks like Debian 11 doesn't come with Instance Connect preinstalled https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html#eic-prereqs-amis and Instance Connect doesn't appear to be support on Debian either https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html

profile picture
EXPERT
Steve_M
answered 10 months ago
  • I did the tests with instances of the Debian and Ubuntu type but I wasn't successful (perhaps due to lack of compatibility). Only with Linux from Amazon I was able to establish a connection. Thanks for the help...

  • You're welcome John. Can you accept the answer please, this will help anybody with the same issue in future as they will see that this is the accepted resolution.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions