Menu
AWS Elastic Beanstalk
Developer Guide

Listing and Connecting to Server Instances

You can view a list of Amazon EC2 instances running your AWS Elastic Beanstalk application environment through the AWS Management Console. You can connect to the instances using any SSH client. You can connect to the instances running Windows using Remote Desktop.

Some notes about specific development environments:

Important

Before you can access your Elastic Beanstalk–provisioned Amazon EC2 instances, you must create an Amazon EC2 key pair and configure your Elastic Beanstalk–provisioned Amazon EC2instances to use the Amazon EC2 key pair. You can set up your Amazon EC2 key pairs using the AWS Management Console. For instructions on creating a key pair for Amazon EC2, see the Amazon EC2 Getting Started Guide. For more information on how to configure your Amazon EC2 instances to use an Amazon EC2 key pair, see EC2 key pair.

By default, Elastic Beanstalk does not enable remote connections to EC2 instances in a Windows container except for those in legacy Windows containers. (Elastic Beanstalk configures EC2 instances in legacy Windows containers to use port 3389 for RDP connections.) You can enable remote connections to your EC2 instances running Windows by adding a rule to a security group that authorizes inbound traffic to the instances. We strongly recommend that you remove the rule when you end your remote connection. You can add the rule again the next time you need to log in remotely. For more information, see Adding a Rule for Inbound RDP Traffic to a Windows Instance and Connect to Your Windows Instance in the Amazon Elastic Compute Cloud User Guide for Microsoft Windows.

To view and connect to Amazon EC2 instances for an environment

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane of the console, choose Load Balancers.

    
          Amazon EC2 console
  3. Load balancers created by Elastic Beanstalk have awseb in the name. Find the load balancer for your environment and click it.

    
          Amazon EC2 load balancers page
  4. Choose the Instances tab in the bottom pane of the console.

    
          Instances tab in the Elastic Load Balancing page

    A list of the instances that the load balancer for your Elastic Beanstalk environment uses is displayed. Make a note of an instance ID that you want to connect to.

  5. In the navigation pane of the Amazon EC2 console, choose Instances, and find your instance ID in the list.

    
          Choosing an Amazon EC2 instance
  6. Right-click the instance ID for the Amazon EC2 instance running in your environment's load balancer, and then select Connect from the context menu.

  7. Make a note of the instance's public DNS address on the Description tab.

  8. Connect to an instance running Linux by using the SSH client of your choice, and then type ssh -i .ec2/mykeypair.pem ec2-user@<public-DNS-of-the-instance> . For instructions on how to connect to an instance running Windows, see Connect to your Windows Instance in the Amazon Elastic Compute Cloud Microsoft Windows Guide.

For more information on connecting to an Amazon EC2 instance, see the Amazon Elastic Compute Cloud Getting Started Guide.