Install the CodeDeploy agent for Windows Server
On Windows Server instances, you can use one of these methods to download and install the CodeDeploy agent:
-
Run a series of Windows PowerShell commands.
-
Choose a direct download link.
-
Run an Amazon S3 copy command.
We recommend installing the CodeDeploy agent with AWS Systems Manager to be able to configure scheduled updates of the agent. For more information, see Install the CodeDeploy agent using AWS Systems Manager.
Use Windows PowerShell
Sign in to the instance, and run the following commands in Windows PowerShell:
-
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
-
Load the AWS Tools for Windows PowerShell.
Import-Module AWSPowerShell
-
Create a directory into where the CodeDeploy agent installation file is downloaded.
New-Item -Path "c:\temp" -ItemType "directory" -Force
-
Download the CodeDeploy agent installation file.
To install the latest version of the CodeDeploy agent:
-
powershell.exe -Command Read-S3Object -BucketName
bucket-name
-Key latest/codedeploy-agent.msi -File c:\temp\codedeploy-agent.msi
To install a specific version of the CodeDeploy agent:
-
powershell.exe -Command Read-S3Object -BucketName
bucket-name
-Key releases/codedeploy-agent-###
.msi -File c:\temp\codedeploy-agent.msi
bucket-name
is the name of the Amazon S3 bucket that contains the CodeDeploy Resource Kit files for your region. For example, for the US East (Ohio) Region, replacebucket-name
withaws-codedeploy-us-east-2
. For a list of bucket names, see Resource kit bucket names by Region. -
-
Run the CodeDeploy agent installation file.
c:\temp\codedeploy-agent.msi /quiet /l c:\temp\host-agent-install-log.txt
To check that the service is running, run the following command:
powershell.exe -Command Get-Service -Name codedeployagent
If the 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 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
Use a direct link
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 CodeDeploy agent and then run the installer
manually.
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 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) |
|
US East (N. Virginia) |
|
US West (N. California) |
|
US West (Oregon) |
|
Canada (Central) |
|
Europe (Ireland) |
|
Europe (London) |
|
Europe (Paris) |
|
Europe (Frankfurt) |
|
Asia Pacific (Hong Kong) |
|
Asia Pacific (Tokyo) |
|
Asia Pacific (Seoul) |
|
Asia Pacific (Singapore) |
|
Asia Pacific (Sydney) |
|
Asia Pacific (Mumbai) |
|
South America (São Paulo) |
|