Skip to content

EC2 Instance Connect Fails

0

I can no longer access an existing (older version) Linux EC2 instance because EC2 Instance Connect fails and SSH from my client also fails, but if I launch a new instance using a newer AMI/OS version in the same account/region , the new instance can do the EC2 Instance Connect. Is there any way to recover access to the old instance without rebuilding it as the content in there is quite important. Thanks for your kind attetion. Enter image description here

asked a month ago48 views
2 Answers
0

This is a common issue that can occur with EC2 instances, even after they've been running successfully for some time. Since your new instances with newer AMIs are working fine, the issue is likely specific to your older instance. Here are several troubleshooting steps you can take to regain access:

  1. Check security group settings: Ensure that SSH traffic (port 22) is allowed from the EC2 Instance Connect IP range for your specific region. AWS periodically updates these IP ranges, so your security group might need updating.

  2. Verify instance health: Looking at your screenshot, one of the status checks is failing. This indicates a potential OS-level issue inside the EC2 instance that could be preventing connections.

  3. Try stopping and starting the instance (not just rebooting): This can sometimes resolve connectivity issues, especially with failing status checks. Note that this will change the public IP address if you're not using an Elastic IP.

  4. Check if the EC2 Instance Connect package is still installed and functioning on your older instance: System updates might have affected this service.

  5. Consider alternative connection methods: If you can't connect via SSH or EC2 Instance Connect, try using AWS Systems Manager Session Manager if it's configured on your instance.

  6. Review network settings: Ensure your instance is in a public subnet with an internet gateway attached, allowing for outbound traffic necessary for Instance Connect to function.

If you're concerned about the data on the instance, you could:

  1. Create a snapshot of the EBS volume
  2. Create a new volume from the snapshot
  3. Attach this volume to a new instance that you can access
  4. Mount the volume and retrieve your important data

This approach would allow you to recover your data without needing to fix the connection issues on the original instance.
Sources
EC2 Instance Connect cannot connect to my instance ! | AWS re:Post
Failed to connect to your instance | AWS re:Post
Cannot connect yo my instance anymore | AWS re:Post

answered a month ago
EXPERT
reviewed a month ago
0

If SSH and EC2 Instance Connect both fail on the old instance, but new instances work in the same account and region, the issue is inside the instance OS, not AWS or networking.

EC2 Instance Connect still depends on a working SSH service. If sshd is broken, the disk is full, or the OS is unhealthy, Instance Connect will also fail.

How to recover without rebuilding

The safest option is:

  • Stop the instance
  • Detach the root EBS volume
  • Attach it to a working EC2 instance
  • Either fix SSH or copy your important data
  • Reattach or migrate the data to a new instance

This is the standard AWS recovery approach.

Why new instances work

New AMIs have updated OS packages and proper Instance Connect support. Your VPC and security groups are fine.

Summary

This is an OS-level issue on the old instance. Use EBS volume attach/snapshot to recover access or data.

answered a month ago

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.