Cannot connect to AWS instance created by Beanstalk


I got the following error while trying to connect to the AWS instance.

Make sure you already have a keypair that created before you create an instance and fyi the keypair is only able to download once after creation (how to create AWS keypair).




First Error

Warning
You may not be able to connect to this instance as ports 22 may need to be open in order to be accessible. Your current security groups don't have ports 22 open.

This error caused by unopened port 22.

Click Security Group
Click Security Group Link.
Click "Edit Inbound Rules".


Add new inbound rule

Second Error

Instance is not associated with a key pair
This instance is not associated with a key pair. Without a key pair you will need to log into this instance using a valid username and password combination.

Enter Beanstalk security configuration page.

Services -> Elastic Beanstalk -> {Choose the application} -> Configuraion -> Security.

Elastic Beansstalk on menu.


Select the applicaiton



Click the  Configuration link on the left side.

Go to the Security box under Configuration and then click Modify. 


Existing, then change to below.

Change to:



You will have the following message if you try to enter the Security page again.

Changes to option EC2KeyName settings will not take effect immediately. Each of your existing EC2 instances will be replaced and your new settings will take effect then.

Or following message.

Warning
Changes to option EC2KeyName settings will not take effect immediately. Each of your existing EC2 instances will be replaced and your new settings will take effect then.
aws:autoscaling:launchconfiguration:EC2KeyName "null" => "SSH KEYPAIR"
Just click the Configure button.

Now you will have following modal after click connect on the instance.

click connect.


Connect to your instance

The Result





Make sure you have created a Keypair before creating the instance. If you created the Keypair after the instance then  the Keypair won't work!



Comments

Popular posts from this blog

Numpang Kerja Remote dari Bandung Creative Hub

Numpang Kerja Remote dari Bandung Digital Valley

Cara Decompile berkas Dex dan Apk Android