Unassigning a Registered Instance - AWS OpsWorks

Unassigning a Registered Instance

Important

The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers. We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post or through AWS Premium Support.

Note

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