---
title: "Import Instance from AWS"
method: POST
path: "/aws/ec2/managedInstance/migration"
tags: ["Stateful Node AWS"]
---

# Import Instance from AWS

`POST /aws/ec2/managedInstance/migration`

<ul> <li>Import an instance from AWS into Stateful Node, while keeping the instance data and its persistence settings.
<li>This call is starting the migration and returns migration ID.
<li>In order to get migration status use the Get Migration Status call <ul>

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref

## Request body

- object
  - `migration` object, required — Migration Configuration
    - `shouldKeepPrivateIp` boolean — Set whether the instance should keep its private ip or not
    - `shouldKeepMetadataOptions` boolean — Set whether the instance should keep its metadataOptions or not
    - `originalInstanceId` string, required — The instance ID on AWS
    - `region` string, required — Set instance's region
    - `shouldTerminateInstance` boolean — Set true or false whether to terminate the instance in AWS. Note: If shouldKeepPrivateIp is true, then shouldTerminateInstance must be true. Otherwise an error will be returned.
    - `managedInstanceName` string — Set Stateful Node name
    - `product` string — Set instance's product
    - `spotInstanceTypes` string[] — List of possible instance types for the Stateful Node
    - `availabilityZones` object[] — List of availability zones for the Stateful Node. Should exist only if shouldKeepPrivateIp is false.
      - `name` string — Availability Zone name
      - `subnetIds` string[]

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
