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

Manually Deregister an On-Premises Instance

Typically, you deregister an on-premises instance after you're no longer planning to deploy to it. You use the AWS CLI to manually deregister on-premises instances.

Manually deregistering an on-premises instance does not uninstall the AWS CodeDeploy agent. It does not remove the configuration file from the instance. It does not delete the IAM user associated with the instance. It does not remove any tags associated with the instance.

To automatically uninstall the AWS CodeDeploy agent and remove the configuration file from the on-premises instance, see Automatically Uninstall the AWS CodeDeploy Agent and Remove the Configuration File from an On-Premises Instance.

To manually uninstall only the AWS CodeDeploy agent, see Managing AWS CodeDeploy Agent Operations.

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

To manually remove only the associated on-premises instance tags, see Manually Remove On-Premises Instance Tags from an On-Premises Instance.

  • Call the deregister-on-premises-instance command, specifying the name that uniquely identifies the on-premises instance (with the --instance-name option):

    aws deploy deregister-on-premises-instance --instance-name AssetTag12010298EX

    After you deregister an on-premises instance, you cannot create a replacement instance with the same name or the same associated IAM user name until AWS CodeDeploy deletes its records about the deregistered on-premises instance. This typically takes about 24 hours.