While you try to Connect the Instance, you will get a failure message as given below.
Why it fails to connect to your instance
Failure to connect to your instance typically occurs when there is an issue in establishing a connection between your device and a server or cloud instance.
Server/Instance Problems
The instance might be stopped, shut down, or not running.
The server could be experiencing high load, crashes, or system failures.
Incorrect server IP address or domain name.
How to fix EC2 Instance Connect Failure
While you connect EC2 Instance, it is trying to connect using SSH. So, you need to make changes in the Security Group to allow the SSH connection. For that:
Step 1. Go to your Instance and go to Security Group.
Step 2. In that Security Group go to Inbound rules.
Inbound is the traffic coming anywhere from the internet to your EC2 Instance. By default, it will not allow any traffic. It will be allowed only within the Security Group.
Step 3. Click on Edit inbound rules. Then change the IP address under Source. Here you can give your IP address or public IP of your machine.
Metclouds Technologies AWS consulting service is here to help you.