Install the CodeDeploy agent using Amazon Systems Manager - Amazon CodeDeploy
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 CodeDeploy agent using Amazon Systems Manager

You can use the Amazon Web Services Management Console or the Amazon CLI to install the CodeDeploy agent to your Amazon EC2 or on-premises instances by using Amazon Systems Manager. You can choose to install a specific version or choose to always install the latest version of the agent. For more information about Amazon Systems Manager, see What is Amazon Systems Manager.

Using Amazon Systems Manager is the recommended method for installing and updating the CodeDeploy agent. You can also install the CodeDeploy agent from an Amazon S3 bucket. For information about using an Amazon S3 download link, see Install the CodeDeploy agent using the command line.

Prerequisites

Follow the steps in Getting started with CodeDeploy to set up IAM permissions and the Amazon CLI.

If installing the CodeDeploy agent on an on-premises server with Systems Manager, you must register your on-premises server with Amazon EC2 Systems Manager. For more information, see Setting up Systems Manager in hybrid environments in the Amazon Systems Manager User Guide.

Install the CodeDeploy agent

Before you can use Systems Manager to install the CodeDeploy agent, you must make sure that the instance is configured correctly for Systems Manager.

Installing or updating the SSM agent

On an Amazon EC2 instance, the CodeDeploy agent requires that the instance is running version 2.3.274.0 or later. Before you install the CodeDeploy agent, update or install SSM agent on the instance if you haven't already done so.

The SSM agent comes preinstalled on some Amazon EC2 AMIs provided by Amazon. For more information, see Amazon Machine Images (AMIs) with SSM agent preinstalled.

Note

Make sure that the instance's operating system is also supported by the CodeDeploy agent. For more information, see Operating systems supported by the CodeDeploy agent.

For information about installing or updating SSM agent on an instance running Linux, see Installing and configuring the SSM agent on Linux instances in the Amazon Systems Manager User Guide.

For information about installing or updating SSM agent on an instance running Windows Server, see Installing and configuring SSM agent on Windows instances in the Amazon Systems Manager User Guide.

(Optional) Verify Systems Manager prerequisites

Before you use Systems Manager Run Command to install the CodeDeploy agent, verify that your instances meet the minimum Systems Manager requirements. For more information, see Setting up Amazon Systems Manager in the Amazon Systems Manager User Guide.

Install the CodeDeploy agent

With SSM, you can install the CodeDeploy once or set up a schedule to install new versions.

To install the CodeDeploy agent, choose the AWSCodeDeployAgent package while you follow the steps in Install or update packages with Amazon Systems Manager distributor.