Registering an Instance with an AWS OpsWorks Stacks Stack
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
Note
This feature is supported only for Linux stacks.
To register an instance that is outside of AWS OpsWorks Stacks, you run the AWS CLI aws opsworks register
command. You can run this command from the instance that you want to register, or from
another computer. You apply the AWSOpsWorksRegisterCLI_EC2
or
AWSOpsWorksRegisterCLI_OnPremises
policies to a user or group to
grant permissions required for the AWS CLI to register EC2 or on-premises instances,
respectively. These policies require version 1.16.180 of the AWS CLI or newer.
Note
To prevent users or roles from registering instances, update the instance profile to deny access to the register command.
The registration process installs an agent on an instance that you want to manage by using AWS OpsWorks Stacks, and registers the instance with an AWS OpsWorks stack that you specify. After you register an instance, the instance is part of the stack and is managed by AWS OpsWorks Stacks. For more information, see Managing Registered Instances.
Note
Although AWS Tools
for PowerShell includes the Register-OpsInstance
cmdlet, which calls the
register
API action, we recommend that you use the AWS CLI to run the
register
command instead.
The following diagram shows both approaches to registering an Amazon EC2 instance. You can use the same approaches for registering an on-premises instance.
Note
You can use the AWS OpsWorks Stacks
consoleregister
command to register the instance. The reason for this is
that the registration process must be run from the instance, which can't be done by
the console.
The following sections describe the procedure in detail.