When you stop an ECS instance and release its computing resources, you can associate the instance with a dedicated host so that when you restart the instance, it is still deployed on the original dedicated host.
Prerequisites
Before you begin, ensure that you have:
An ECS instance already running on a dedicated host. To create one, see Create one or more ECS instances on a dedicated host
Associate an instance with a dedicated host
Log on to the ECS console.
In the left-side navigation pane, choose Instances & Images > Instances.
In the upper-left corner of the top navigation bar, select a region.

Find the instance and choose the action in the Actions column.
In the Modify Host Deployment dialog box, select Yes from the Associate with Host: drop-down list.
If the instance is stopped with its computing resources released, it restarts on the same dedicated host. If that host has insufficient resources at restart time, the instance fails to start. For details, see Functions and features.
Click OK.
Verify the association
After clicking OK, confirm the association was applied:
In the left-side navigation pane, choose Dedicated Hosts.
Find the dedicated host where the instance resides and click Details in the Actions column.
On the Instances tab, check the Associate with Host column — the value for the instance is now Yes.

The instance is now pinned to this dedicated host. The next time you stop the instance and release its computing resources, it restarts on the same host automatically, with no additional configuration required.