- Newest
- Most votes
- Most comments
Can you check that you have met all the Prerequisites for EC2 Instance Connect. AMI? Region? Instance Connect installed?
Hello.
There is no key pair set up for this template, are you doing SSH without a key pair?
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-keyname
Also, would it be possible for you to share what errors you are seeing when you do SSH?
In the case of a timeout error, I would need to check the subnet's network ACL settings, security group settings, etc.
Yes, I am proceeding without a key pair as this is only a trial and the stack will be removed after the test. I am utilizing EC2 Instance Connect from the AWS management console, but encountering an error that states: "Failed to connect to your instance. Error establishing SSH connection to your instance. Please try again later."
Hi
It's very hard to give an good answer with only this short information. But my best guess is that the specified SG sg-016102e48c9c5d87a
don't allow incoming traffic on port 22. An other guess is that subnet-0bd9f4938efe103ae
is not routed to an Internet Gateway.
I added the route table, ACL, and security group configurations to the post, please check it.
Relevant content
- asked 2 years ago
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 10 months ago
This is really helpful. EC2 Instance Connect is not preinstalled on my original selected AMI. update the latest AMI, SSH works well. Thanks, Kentrad
Confused - how come you got it to work for the EC2 that you created in the Console? Did you use a different AMI for that?
When I created the EC2 instance from the console, I selected the default AMI which is the latest AMI. But my cloudformaton used an old AMI that has no EC2 Instance connect pre-installed.