Create a host - Developer Tools console

Create a host

You can use the AWS Management Console or the AWS Command Line Interface (AWS CLI) to create a connection to a third-party code repository that is installed on your infrastructure. For example, you might have GitHub Enterprise Server running as a virtual machine on an Amazon EC2 instance. Before you create a connection to GitHub Enterprise Server, you create a host to use for the connection.

Before you begin:

  • You must have already created a network or virtual private cloud (VPC).

  • You must have already created your instance and, if you plan to connect with your VPC, launched your instance into your VPC.

For more information about network configuration for your host resource, see Troubleshooting VPC configuration for your host.

To use the console to create a connection to GitHub Enterprise Server, see Create your GitHub Enterprise Server connection (console). The console creates your host for you.

Important

AWS CodeStar Connections does not support GitHub Enterprise Server version 2.22.0 due to a known issue in the release. For more information, see the release notes Known Issues list at https://enterprise.github.com/releases/series/2.22.

Create a host for a connection (console)

For connections to GitHub Enterprise Server, you use a host to represent the endpoint for the infrastructure where your third-party provider is installed.

To learn about considerations for setting up a host in a VPC, see Prerequisites: Network or Amazon VPC configuration for your connection.

Note

You only create a host once per GitHub Enterprise Server account. All of your connections to a specific GitHub Enterprise Server account will use the same host.

To create a host

  1. Sign in to the AWS Management Console, and open the AWS Developer Tools console at https://console.aws.amazon.com/codesuite/settings/connections.

  2. On the Hosts tab, choose Create host.

  3. In Host name, enter the name you want to use for your host.

  4. In Select a provider, choose GitHub Enterprise Server.

  5. In URL, enter the endpoint for the infrastructure where your provider is installed.

  6. If your server is configured within an Amazon VPC and you want to connect with your VPC, choose Use a VPC. Otherwise, choose No VPC.

  7. If you have launched your instance into an Amazon VPC and you want to connect with your VPC, choose Use a VPC and complete the following.

    1. In VPC ID, choose your VPC ID. Make sure to choose the VPC for the infrastructure where your GitHub Enterprise Server instance is installed or a VPC with access to your GitHub Enterprise Server instance through VPN or Direct Connect.

    2. If you have a private VPC configured, and you have configured your GitHub Enterprise Server instance to perform TLS validation using a non-public certificate authority, in TLS certificate, enter your certificate ID. The TLS Certificate value is the public key of the certificate.

  8. Choose Create host.

  9. After the host details page displays, the host status changes as the host is created.

    Note

    If your host setup includes a VPC configuration, allow several minutes for provisioning of host network components.

    Wait for your host to reach a Pending status, and then complete the setup. For more information, see Set up a pending host.

    
                Console screenshot showing host details with the host in Pending
                    status.

Create a host (CLI)

You can use the AWS Command Line Interface (AWS CLI) to create a host for installed connections.

Note

You only create a host once per GitHub Enterprise Server account. All of your connections to a specific GitHub Enterprise Server account will use the same host.

You use a host to represent the endpoint for the infrastructure where your third-party provider is installed. To create a host with the CLI, you use the create-host command. After you finish creating the host, the host is in Pending status. You then set up the host to move it to an Available status. After the host is available, you complete the steps to create a connection.

Important

A host created through the AWS CLI is in Pending status by default. After you create a host with the CLI, use the console to set up the host to make its status Available.

To create a host

  1. Open a terminal (Linux, macOS, or Unix) or command prompt (Windows). Use the AWS CLI to run the create-host command, specifying the --name, --provider-type, and --provider-endpoint for your connection. In this example, the third-party provider name is GitHubEnterpriseServer and the endpoint is my-instance.dev.

    aws codestar-connections create-host --name MyHost --provider-type GitHubEnterpriseServer --provider-endpoint "https://my-instance.dev"

    If successful, this command returns the host Amazon Resource Name (ARN) information similar to the following.

    { "HostArn": "arn:aws:codestar-connections:us-west-2:account_id:host/My-Host-28aef605" }

    After this step, the host is in PENDING status.

  2. Use the console to complete the host setup and move the host to an Available status. For more information, see Set up a pending host.