AWS CodeDeploy
User Guide (API Version 2014-10-06)

The procedures in this guide support the new console design. If you choose to use the older version of the console, you will find many of the concepts and basic procedures in this guide still apply. To access help in the new console, choose the information icon.

Install or reinstall the AWS CodeDeploy agent for Windows Server

On Windows Server instances, you can use one of these methods to download and install the AWS CodeDeploy agent:

  • Run a series of Windows PowerShell commands

  • Choose a direct download link

  • Run an Amazon S3 copy command

Note

On both new and existing instances, we recommend installing the AWS CodeDeploy agent updater for Windows Server. The updater checks periodically for new versions of the agent and installs it when a new version is available. On new instances, you can install the updater instead of the agent, and the current version of the agent will be installed immediately after the updater. For more information, see Update the AWS CodeDeploy Agent on Windows Server.

Use Windows PowerShell

Sign in to the instance, and run the following commands in Windows PowerShell:

  1. Require that all scripts and configuration files downloaded from the Internet be signed by a trusted publisher. If you are prompted to change the execution policy, type "Y."

    Set-ExecutionPolicy RemoteSigned
  2. Load the AWS Tools for Windows PowerShell.

    Import-Module AWSPowerShell
  3. Create a directory into where the AWS CodeDeploy agent installation file is downloaded.

    New-Item -Path "c:\temp" -ItemType "directory" -Force
  4. Download the AWS CodeDeploy agent installation file.

    powershell.exe -Command Read-S3Object -BucketName bucket-name -Key latest/codedeploy-agent.msi -File c:\temp\codedeploy-agent.msi
  5. Run the AWS CodeDeploy agent installation file.

    c:\temp\codedeploy-agent.msi /quiet /l c:\temp\host-agent-install-log.txt

    bucket-name is the name of the Amazon S3 sds-s3-latest-bucket-name bucket that contains the AWS CodeDeploy Resource Kit files for your region. For example, for the US East (Ohio) Region, replace bucket-name with aws-codedeploy-us-east-2. For a list of bucket names, see Resource Kit Bucket Names by Region.

To check that the service is running, run the following command:

powershell.exe -Command Get-Service -Name codedeployagent

If the AWS CodeDeploy agent was just installed and has not been started, then after running the Get-Service command, under Status, you should see Start...:

Status Name DisplayName ------ ---- ----------- Start... codedeployagent CodeDeploy Host Agent Service

If the AWS CodeDeploy agent is already running, after running the Get-Service command, under Status, you should see Running:

Status Name DisplayName ------ ---- ----------- Running codedeployagent CodeDeploy Host Agent Service

If the browser security settings on the Windows Server instance provide the permissions (for example, to http://*.s3.amazonaws.com), you can use a direct link for your region to download the AWS CodeDeploy agent and then run the installer manually.

Region name Download link

US East (Ohio)

https://aws-codedeploy-us-east-2.s3.amazonaws.com/latest/codedeploy-agent.msi

US East (N. Virginia)

https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/codedeploy-agent.msi

US West (N. California)

https://aws-codedeploy-us-west-1.s3.amazonaws.com/latest/codedeploy-agent.msi

US West (Oregon)

https://aws-codedeploy-us-west-2.s3.amazonaws.com/latest/codedeploy-agent.msi

Canada (Central)

https://aws-codedeploy-ca-central-1.s3.amazonaws.com/latest/codedeploy-agent.msi

EU (Ireland)

https://aws-codedeploy-eu-west-1.s3.amazonaws.com/latest/codedeploy-agent.msi

EU (London)

https://aws-codedeploy-eu-west-2.s3.amazonaws.com/latest/codedeploy-agent.msi

EU (Paris)

https://aws-codedeploy-eu-west-3.s3.amazonaws.com/latest/codedeploy-agent.msi

EU (Frankfurt)

https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/codedeploy-agent.msi

Asia Pacific (Tokyo)

https://aws-codedeploy-ap-northeast-1.s3.amazonaws.com/latest/codedeploy-agent.msi

Asia Pacific (Seoul)

https://aws-codedeploy-ap-northeast-2.s3.amazonaws.com/latest/codedeploy-agent.msi

Asia Pacific (Singapore)

https://aws-codedeploy-ap-southeast-1.s3.amazonaws.com/latest/codedeploy-agent.msi

Asia Pacific (Sydney)

https://aws-codedeploy-ap-southeast-2.s3.amazonaws.com/latest/codedeploy-agent.msi

Asia Pacific (Mumbai)

https://aws-codedeploy-ap-south-1.s3.amazonaws.com/latest/codedeploy-agent.msi

South America (São Paulo)

https://aws-codedeploy-sa-east-1.s3.amazonaws.com/latest/codedeploy-agent.msi

Use an Amazon S3 Copy Command

If the AWS CLI is installed on the instance, you can use the Amazon S3 cp command to download the AWS CodeDeploy agent and then run the installer manually. For information, see Install the AWS Command Line Interface on Microsoft Windows.

Region name Amazon S3 copy command

US East (Ohio)

aws s3 cp s3://aws-codedeploy-us-east-2/latest/codedeploy-agent.msi codedeploy-agent.msi

US East (N. Virginia)

aws s3 cp s3://aws-codedeploy-us-east-1/latest/codedeploy-agent.msi codedeploy-agent.msi

US West (N. California)

aws s3 cp s3://aws-codedeploy-us-west-1/latest/codedeploy-agent.msi codedeploy-agent.msi

US West (Oregon)

aws s3 cp s3://aws-codedeploy-us-west-2/latest/codedeploy-agent.msi codedeploy-agent.msi

Canada (Central)

aws s3 cp s3://aws-codedeploy-ca-central-1/latest/codedeploy-agent.msi codedeploy-agent.msi

EU (Ireland)

aws s3 cp s3://aws-codedeploy-eu-west-1/latest/codedeploy-agent.msi codedeploy-agent.msi

EU (London)

aws s3 cp s3://aws-codedeploy-eu-west-2/latest/codedeploy-agent.msi codedeploy-agent.msi

EU (Paris)

aws s3 cp s3://aws-codedeploy-eu-west-3/latest/codedeploy-agent.msi codedeploy-agent.msi

EU (Frankfurt)

aws s3 cp s3://aws-codedeploy-eu-central-1/latest/codedeploy-agent.msi codedeploy-agent.msi

Asia Pacific (Tokyo)

aws s3 cp s3://aws-codedeploy-ap-northeast-1/latest/codedeploy-agent.msi codedeploy-agent.msi

Asia Pacific (Seoul)

aws s3 cp s3://aws-codedeploy-ap-northeast-2/latest/codedeploy-agent.msi codedeploy-agent.msi

Asia Pacific (Singapore)

aws s3 cp s3://aws-codedeploy-ap-southeast-1/latest/codedeploy-agent.msi codedeploy-agent.msi

Asia Pacific (Sydney)

aws s3 cp s3://aws-codedeploy-ap-southeast-2/latest/codedeploy-agent.msi codedeploy-agent.msi

Asia Pacific (Mumbai)

aws s3 cp s3://aws-codedeploy-ap-south-1/latest/codedeploy-agent.msi codedeploy-agent.msi

South America (São Paulo)

aws s3 cp s3://aws-codedeploy-sa-east-1/latest/codedeploy-agent.msi codedeploy-agent.msi