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

A new console design is available for this service. Although the procedures in this guide were written for the older version of the console, you will find many of the concepts and basic procedures in this guide still apply.

Automatically Uninstall the AWS CodeDeploy Agent and Remove the Configuration File from an On-Premises Instance

Typically, you uninstall the AWS CodeDeploy agent and remove the configuration file from an on-premises instance after you're no longer planning to deploy to it.

Note

Automatically uninstalling the AWS CodeDeploy agent and removing the configuration file from an on-premises instance does not deregister an on-premises instance. It does not disassociate any on-premises instance tags associated with the on-premises instance. It does not delete the IAM user associated with the on-premises instance.

To automatically deregister the on-premises instance, see Automatically Deregister an On-Premises Instance.

To manually deregister the on-premises instance, see Manually Deregister an On-Premises Instance.

To manually disassociate any associated on-premises instance tags, see Manually Remove On-Premises Instance Tags from an On-Premises Instance.

To manually uninstall the AWS CodeDeploy agent from the on-premises instance, see Managing AWS CodeDeploy Agent Operations.

To manually delete the associated IAM user, see Deleting an IAM User from Your AWS Account.

From the on-premises instance, use the AWS CLI to call the uninstall command.

For example:

aws deploy uninstall

The uninstall command does the following:

  1. Stops the running AWS CodeDeploy agent on the on-premises instance.

  2. Uninstalls the AWS CodeDeploy agent from the on-premises instance.

  3. Removes the configuration file from the on-premises instance. (For Ubuntu Server and RHEL, this is /etc/codedeploy-agent/conf/codedeploy.onpremises.yml. For Windows Server, this is C:\ProgramData\Amazon\CodeDeploy\conf.onpremises.yml.)