do you still have the problem or could you fix it by following the linked guide in the error message you posted? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html#ec2-instance-connect-setup-security-group
If you still have the problem, could you post a few details?
- Is your instance launched in a private or public subnet?
- How do you try to connect to the instance (cli or console)?
- Does your securitygroup allow ingress AWS-Instance-Connect Cidrs (if accessing by console)? (see f.e. https://github.com/joetek/aws-ip-ranges-json/blob/master/ip-ranges-ec2-instance-connect.json)
- Otherwise does your securitygroup allow ingress from your ip?
EC2 Instance suddenly cannot connect to Internetasked a month ago
Unable to connect to EC2 instance & access over internetasked 2 months ago
Failed to connect to instanceasked 19 days ago
Unable to connect to amazon EC2 instance via PuTTYasked 2 months ago
Failed to connect to my instance and serverasked a month ago
Randomly unable to connect to ec2 instance from some networksasked 10 months ago
Unable to Connect to Instanceasked 7 months ago
Unable to connect to EC2 instance in private Subnetasked a year ago
How to fix the error Failed to connect to your instance?asked 3 months ago
Unable to connect to EC2 instance via aws websiteAccepted Answerasked 6 months ago