Attaching and Moving Resources

After you register a resource with a stack, you can attach it to one of the stack's
instances. You can also move an attached resource from one instance to another. Note
the
following:

When you attach or move Amazon EBS volumes, the instances involved in the operation
must be offline. If the instance you are interested in is not on the
Resources page, go to the
Instances page and stop the instance. After it
has stopped, you can return to the Resources page and
attach or move the resource.

When you attach or move Elastic IP addresses, the instances can be online or
offline.

If you delete an instance, any attached resources remain registered with the
stack. You can then attach the resource to another instance or, if you no longer
need it, deregister the resource.

Associating Elastic IP Addresses with an
Instance

You can associate a registered Elastic IP address with an instance and move it
from one instance to another, including instances in other stacks. The instances can
be either online or offline.

To associate an Elastic IP address with an instance

On the Resources page, click associate with
instance in the appropriate address's
Instance column.

On the address's details page, select the appropriate instance, specify
the address's name, and click Save to associate the
address with the instance.

Note

If the Elastic IP address is currently associated with another online
instance, AWS OpsWorks Stacks automatically reassigns the address to the new instance.

You can also use the details page to move an associated Elastic IP address to
another instance.

To move an Elastic IP address to another instance

On the Resources page, click Elastic
IPs and click edit in the address's
Actions column.

Do one of the following:

To move the address to another instance in the stack, select the
appropriate instance from the Instance list and
click Save.

To move the address to an instance in another stack, click
change in the Stack settings to see a list of the
available stacks. Select a stack from the Stack
list and an instance from the Instance list.
Then click Save.

After you attach or move an address, AWS OpsWorks Stacks triggers a Configure lifecycle event to notify the stack's instances of the
change.

Attaching Amazon RDS Instances to an App

You can attach an Amazon RDS instance to one or more apps.

To attach an Amazon RDS instance to an app

On the Resources page, click Add
app in the appropriate instance's Apps column.

Use the Add App page to attach the Amazon RDS instance.
For more information, see Adding Apps.

Because an Amazon RDS can be attached to multiple apps, there is no special procedure
for moving the instance from one app to another. Just edit the first app to remove
the RDS instance or edit the second app to add the RDS instance. For more
information, see Editing Apps.

Javascript is disabled or is unavailable in your browser.

To use the AWS Documentation, Javascript must be enabled. Please refer to your browser's
Help pages for instructions.