Install the latest version of EC2Launch v2 - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Install the latest version of EC2Launch v2

You can use one of the following methods to install the EC2Launch v2 agent on your EC2 instance:

  • Download the agent from Amazon S3 and install with Windows PowerShell. For download URLs, see EC2Launch v2 downloads on Amazon S3.

  • Install with SSM Distributor.

  • Install from an EC2 Image Builder component.

  • Launch your instance from an AMI that has EC2Launch v2 pre-installed.

Warning

AmazonEC2Launch.msi uninstalls previous versions of the EC2 launch services, such as EC2Launch (v1) and EC2Config.

For install steps, select the tab that matches your preferred method.

Windows PowerShell

To install the latest version of EC2Launch v2 agent with Windows PowerShell, follow these steps.

  1. Create your local directory.

    New-Item -Path "$env:USERPROFILE\Desktop\EC2Launchv2" -ItemType Directory
  2. Set the URL for your download location. Run the following command with the Amazon S3 URL you'll use. For download URLs, see EC2Launch v2 downloads on Amazon S3

    $Url = "Amazon S3 URL/AmazonEC2Launch.msi"
  3. Use the following compound command to download the agent and run the install

    $DownloadFile = "$env:USERPROFILE\Desktop\EC2Launchv2\" + $(Split-Path -Path $Url -Leaf) Invoke-WebRequest -Uri $Url -OutFile $DownloadFile msiexec /i "$DownloadFile"
  4. To verify the install, check that the msi file exists in the EC2Launch v2 directory on your instance (C:\ProgramData\Amazon\EC2Launch).

Amazon Systems Manager Distributor

You can install the AWSEC2Launch-Agent package from Amazon Systems Manager Distributor. For instructions on how to install a package from Systems Manager Distributor, see Install or update packages in the Amazon Systems Manager User Guide.

EC2 Image Builder component

You can install the ec2launch-v2-windows component when you build a custom image with EC2 Image Builder. For instructions on how to build a custom image with EC2 Image Builder, see Create an image pipeline using the EC2 Image Builder console wizard in the EC2 Image Builder User Guide.

AMI

EC2Launch v2 is preinstalled by default on the followingWindows Server 2022 and UEFI AMIs:

  • Windows_Server-2022-English-Full-Base

  • Windows_Server-2022-English-Core-Base

  • Windows Server 2022 AMIs with all other languages

  • Windows Server 2022 AMIs with SQL installed

  • Windows_Server-2022-English-Core-EKS_Optimized

EC2Launch v2 is also preinstalled on the following Windows Server AMIs. You can find these AMIs from the Amazon EC2 console, or by using the following search prefix: EC2LaunchV2- in the Amazon CLI.

  • EC2LaunchV2-Windows_Server-2019-English-Core-Base

  • EC2LaunchV2-Windows_Server-2019-English-Full-Base

  • EC2LaunchV2-Windows_Server-2016-English-Core-Base

  • EC2LaunchV2-Windows_Server-2016-English-Full-Base

  • EC2LaunchV2-Windows_Server-2012_R2_RTM-English-Full-Base

  • EC2LaunchV2-Windows_Server-2012_RTM-English-Full-Base

EC2Launch v2 downloads on Amazon S3

To install the latest version of EC2Launch v2, download the installer from one of the following locations:

Note

The 32-bit installation link will be deprecated. We recommend that you use the 64-bit installation link to install EC2Launch v2. If you require a 32-bit launch agent, use EC2Config.

Configure install options

When you install or upgrade EC2Launch v2, you can configure installation options with the EC2Launch v2 install dialog or with the msiexec command in a command line shell.

The first time the EC2Launch v2 installer runs on an instance, it initializes launch agent settings on your instance as follows:

  • It creates the local path and writes the launch agent file to it. This is sometimes referred to as a clean install.

  • It creates the EC2LAUNCH_TELEMETRY environment variable if it doesn't already exist, and sets it based on your configuration.

For configuration details, select the tab that matches the configuration method that you'll use.

Amazon EC2Launch Setup dialog

When you install or upgrade EC2Launch v2, you can configure the following installation options through the EC2Launch v2 install dialog.

Basic Install options
Send Telemetry

When you include this feature in the setup dialog, the installer sets the EC2LAUNCH_TELEMETRY environment variable to a value of 1. If you disable Send Telemetry, the installer sets the environment variable to a value of 0.

When the EC2Launch v2 agent runs, it reads the EC2LAUNCH_TELEMETRY environment variable to determine whether to upload telemetry data. If the value equals 1, it uploads the data. Otherwise, it doesn't upload.

Default configuration

The default configuration for EC2Launch v2 is to overwrite the local launch agent if it exists already. The first time you run an install on an instance, the default configuration performs a clean install. If you disable the default configuration on the initial install, the installation fails.

If you run the install again on the instance, you can disable the default configuration to perform an upgrade that doesn't replace the %ProgramData%/Amazon/EC2Launch/config/agent-config.yml file.

Example: Upgrade EC2Launch v2 with telemetry

The following example shows the EC2Launch v2 setup dialog configured to upgrade the current installation and enable telemetry. This configuration performs an install without replacing the agent configuration file, and sets the EC2LAUNCH_TELEMETRY environment variable to a value of 1.


							EC2Launch v2 upgrade configuration.
Command line

When you install or upgrade EC2Launch v2, you can configure the following installation options with the msiexec command in a command line shell.

ADDLOCAL parameter values
Basic (required)

Install the launch agent. If this value is not present in the ADDLOCAL parameter, the installation ends.

Clean

When you include the Clean value in the ADDLOCAL parameter, the installer writes the agent configuration file to the following location: %ProgramData%/Amazon/EC2Launch/config/agent-config.yml. If the agent configuration file already exists, it overwrites the file.

When you leave the Clean value out of the ADDLOCAL parameter, the installer performs an upgrade that doesn't replace the agent configuration file.

Telemetry

When you include the Telemetry value in the ADDLOCAL parameter, the installer sets the EC2LAUNCH_TELEMETRY environment variable to a value of 1.

When you leave the Telemetry value out of the ADDLOCAL parameter, the installer sets the environment variable to a value of 0.

When the EC2Launch v2 agent runs, it reads the EC2LAUNCH_TELEMETRY environment variable to determine whether to upload telemetry data. If the value equals 1, it uploads the data. Otherwise, it doesn't upload.

Example: install EC2Launch v2 with telemetry

& msiexec /i "C:\Users\Administrator\Desktop\EC2Launchv2\AmazonEC2Launch.msi" ADDLOCAL="Basic,Clean,Telemetry" /q

Verify the EC2Launch v2 version

Use one of the following procedures to verify the version of EC2Launch v2 that is installed on your instances.

Windows PowerShell

Verify the installed version of EC2Launch v2 with Windows PowerShell, as follows.

  1. Launch an instance from your AMI and connect to it.

  2. Run the following command in PowerShell to verify the installed version of EC2Launch v2:

    & "C:\Program Files\Amazon\EC2Launch\EC2Launch.exe" version
Windows Control Panel

Verify the installed version of EC2Launch v2 in the Windows Control Panel, as follows.

  1. Launch an instance from your AMI and connect to it.

  2. Open the Windows Control Panel and choose Programs and Features.

  3. Look for Amazon EC2Launch in the list of installed programs. Its version number appears in the Version column.

For information about the EC2Launch v2 versions included in the Windows AMIs, see Amazon Windows AMIs.

For the latest version of EC2Launch v2, see EC2Launch v2 version history.

For the latest version of the EC2Launch v2 migration tool, see EC2Launch v2 migration tool version history.

You can receive notifications when new versions of the EC2Launch v2 service are released. For more information, see Subscribe to EC2Launch v2 service notifications.