Unassigning a Registered Instance - AWS OpsWorks

Unassigning a Registered Instance


AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.


This feature is supported only for Linux stacks.

You can unassign a registered instance from its layers by using the AWS OpsWorks console, AWS CLI, or SDK operation.

When you unassign an instance, AWS OpsWorks Stacks runs the layer's Shutdown recipes on the instance. These recipes perform tasks such as shutting down services but do not stop the instance. If the instance is assigned to multiple layers, unassign applies to every layer; you can't unassign an instance from a subset of its layers. However, the instance is still registered with the stack, and you can assign it to another layer if you wish.

To unassign a registered instance using the console
  1. In the navigation pane, choose Instances.

  2. Choose the instance that you want to unassign.

  3. On the Details page for the instance, choose Unassign.

                        unassign a registered instance on the instance's details page

To unassign a registered instance using the AWS CLI

Run the aws opsworks unassign-instance command to unassign a registered instance from all layers that are using the instance.

aws opsworks unassign-instance --region region --instance-id instance-id