

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 透過私有網路連線至 Application Migration Service 資料和控制平面
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network"></a>

*Dipin Jain 和 Mike Kuznetsov，Amazon Web Services*

## 總結
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-summary"></a>

此模式說明如何使用介面 VPC 端點，連線到私有安全網路上 AWS Application Migration Service 的資料平面和控制平面。

Application Migration Service 是高度自動化lift-and-shift（重新託管） 解決方案，可簡化、加速和降低將應用程式遷移至 的成本 AWS。它可讓公司重新託管大量實體、虛擬或雲端伺服器，而不會發生相容性問題、效能中斷或長切換時段。Application Migration Service 可從 取得 AWS 管理主控台。這可與其他 無縫整合 AWS 服務，例如 AWS CloudTrail Amazon CloudWatch 和 AWS Identity and Access Management (IAM)。

您可以透過使用 Site-to-Site VPN 服務或 Application Migration Service 中的 VPC 對等互連 AWS Direct Connect，從來源資料中心連線到資料平面，也就是做為目的地 VPC 中資料複寫之暫存區域的子網路。您也可以使用 支援的[介面 VPC 端點](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html) AWS PrivateLink ，透過私有網路連線至 Application Migration Service 控制平面。 

## 先決條件和限制
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-prereqs"></a>

**先決條件**
+ **預備區域子網路** – 在您設定 Application Migration Service 之前，請建立子網路，做為從來源伺服器複寫至 AWS （即資料平面） 之資料的預備區域。首次存取 Application Migration Service 主控台時，您必須在[複寫設定範本](https://docs.aws.amazon.com/mgn/latest/ug/template-vs-server.html)中指定此子網路。您可以在複寫設定範本中覆寫特定來源伺服器的此子網路。雖然您可以在 中使用現有的子網路 AWS 帳戶，但我們建議您為此建立新的專用子網路。
+ **網路需求** – Application Migration Service 在預備區域子網路中啟動的複寫伺服器必須能夠將資料傳送至位於 的 Application Migration Service API 端點`https://mgn.<region>.amazonaws.com/`，其中 `<region>`是 AWS 區域 您要複寫之 的程式碼 （例如 `https://mgn.us-east-1.amazonaws.com`)。下載 Application Migration Service 軟體時，需要 Amazon Simple Storage Service (Amazon S3) 服務 URLs。
  +  AWS 複寫代理程式安裝程式應可存取 AWS 區域 與 Application Migration Service 搭配使用之 的 Amazon Simple Storage Service (Amazon S3) 儲存貯體 URL。
  + 預備區域子網路應可存取 Amazon S3。
  + 安裝 AWS 複寫代理程式的來源伺服器必須能夠將資料傳送至預備區域子網路中的複寫伺服器，以及傳送至位於 的 Application Migration Service API 端點`https://mgn.<region>.amazonaws.com/`。

下表列出所需的連接埠。


| 
| 
| 來源 | 目標 | 站點 | 如需詳細資訊，請參閱 | 
| --- |--- |--- |--- |
| 來源資料中心 | Amazon S3 URLs | 443 (TCP) | [透過 TCP 連接埠 443 的通訊](https://docs.aws.amazon.com/mgn/latest/ug/Network-Requirements.html#TCP-443) | 
| 來源資料中心 | AWS 區域 Application Migration Service 的 特定主控台地址 | 443 (TCP) | [透過 TCP 連接埠 443 的來源伺服器與 Application Migration Service 之間的通訊](https://docs.aws.amazon.com/mgn/latest/ug/Network-Requirements.html#Source-Manager-TCP-443) | 
| 來源資料中心 | 暫存區域子網路 | 1500 (TCP) | [透過 TCP 連接埠 1500 的來源伺服器與預備區域子網路之間的通訊](https://docs.aws.amazon.com/mgn/latest/ug/Network-Requirements.html#Communication-TCP-1500) | 
| 暫存區域子網路 | AWS 區域 Application Migration Service 的 特定主控台地址 | 443 (TCP) | [透過 TCP 連接埠 443 的預備區域子網路與 Application Migration Service 之間的通訊](https://docs.aws.amazon.com/mgn/latest/ug/Network-Requirements.html#Communication-TCP-443-Staging) | 
| 暫存區域子網路 | Amazon S3 URLs | 443 (TCP) | [透過 TCP 連接埠 443 的通訊](https://docs.aws.amazon.com/mgn/latest/ug/Network-Requirements.html#TCP-443) | 
| 暫存區域子網路 | 子網路的 Amazon Elastic Compute Cloud (Amazon EC2) 端點 AWS 區域 | 443 (TCP) | [透過 TCP 連接埠 443 的通訊](https://docs.aws.amazon.com/mgn/latest/ug/Network-Requirements.html#TCP-443) | 

**限制**

Application Migration Service 目前無法在所有 AWS 區域 和 作業系統中使用。
+ [支援的 AWS 區域](https://docs.aws.amazon.com/mgn/latest/ug/supported-regions.html)
+ [支援的作業系統](https://docs.aws.amazon.com/mgn/latest/ug/Supported-Operating-Systems.html)

## Architecture
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-architecture"></a>

下圖說明典型遷移的網路架構。如需此架構的詳細資訊，請參閱 [Application Migration Service 文件](https://docs.aws.amazon.com/mgn/latest/ug/Network-Settings-Video.html)和 [Application Migration Service 架構和網路架構影片](https://youtu.be/ao8geVzmmRo)。

![\[典型遷移的 Application Migration Service 網路架構\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/21346c0f-0643-4f4f-b21f-fdfe24fc6a8f/images/546598b2-8026-4849-a441-eaa2bc2bf6bb.png)


下列詳細檢視顯示預備區域 VPC 中連接 Amazon S3 和 Application Migration Service 的介面 VPC 端點組態。

![\[Application Migration Service 的典型遷移網路架構 - 詳細檢視\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/21346c0f-0643-4f4f-b21f-fdfe24fc6a8f/images/bd0dfd42-4ab0-466f-b696-804dedcf4513.png)


## 工具
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-tools"></a>
+ [AWS Application Migration Service](https://docs.aws.amazon.com/mgn/latest/ug/what-is-application-migration-service.html) 簡化、加速並降低重新託管應用程式的成本 AWS。
+ [介面 VPC 端點](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html)可讓您連線至由 提供支援的服務， AWS PrivateLink 而不需要網際網路閘道、NAT 裝置、VPN 連線或 AWS Direct Connect 連線。VPC 中的執行個體不需要公有 IP 地址，即可與服務中的資源通訊。VPC 與另一個服務之間的流量都會保持在 Amazon 網路的範圍內。

## 史詩
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-epics"></a>

### 建立 Application Migration Service、Amazon EC2 和 Amazon S3 的端點
<a name="create-endpoints-for-mgn-ec2-and-s3"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 設定 Application Migration Service 的介面端點。 | 來源資料中心和預備區域 VPC 會透過您在目標預備區域 VPC 中建立的介面端點，私下連線至 Application Migration Service 控制平面。若要建立端點：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/connect-to-application-migration-service-data-and-control-planes-over-a-private-network.html)如需詳細資訊，請參閱[《Amazon VPC 文件》中的 AWS 服務 使用介面 VPC 端點存取](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html) 。 | 遷移潛在客戶 | 
| 設定 Amazon EC2 的介面端點。 | 預備區域 VPC 會透過您在目標預備區域 VPC 中建立的介面端點，私下連線至 Amazon EC2 API。若要建立端點，請遵循上一個案例提供的指示。[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/connect-to-application-migration-service-data-and-control-planes-over-a-private-network.html) | 遷移潛在客戶 | 
| 設定 Amazon S3 的介面端點。 | 來源資料中心和預備區域 VPC 會透過您在目標預備區域 VPC 中建立的介面端點，私下連線至 Amazon S3 API。若要建立端點，請遵循第一個案例提供的指示。[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/connect-to-application-migration-service-data-and-control-planes-over-a-private-network.html)您使用界面端點，因為閘道端點連線無法從 VPC 延伸。（如需詳細資訊，請參閱 [AWS PrivateLink 文件](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-gateway.html)。) | 遷移潛在客戶 | 
| 設定 Amazon S3 Gateway 端點。 | 在組態階段，複寫伺服器必須連線至 S3 AWS 儲存貯體，才能下載複寫伺服器的軟體更新。不過，Amazon S3 介面端點不支援私有 DNS 名稱*，*而且無法將 Amazon S3 端點 DNS 名稱提供給複寫伺服器。 若要緩解此問題，您可以在預備區域子網路所屬的 VPC 中建立 Amazon S3 閘道端點，並使用相關路由更新預備子網路的路由表。如需詳細資訊，請參閱 AWS PrivateLink 文件中的[建立閘道端點](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html#create-gateway-endpoint-s3)。 | 雲端管理員 | 
| 設定內部部署 DNS 以解析端點的私有 DNS 名稱。 | Application Migration Service 和 Amazon EC2 的介面端點具有可在 VPC 中解析的私有 DNS 名稱。不過，您也需要設定內部部署伺服器來解析這些介面端點的私有 DNS 名稱。設定這些伺服器的方法有多種。在此模式中，我們透過將內部部署 DNS 查詢轉送到暫存區域 VPC 中的 Amazon Route 53 Resolver 傳入端點來測試此功能。如需詳細資訊，請參閱 Route 53 文件中的[解決 VPCs 與網路之間的 DNS 查詢](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver-overview-DSN-queries-to-vpc.html)。 | 遷移工程師 | 

### 透過私有連結連線至 Application Migration Service 控制平面
<a name="connect-to-the-mgn-control-plane-over-a-private-link"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 使用 AWS 安裝複寫代理程式 AWS PrivateLink。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/connect-to-application-migration-service-data-and-control-planes-over-a-private-network.html)以下是 Linux 的範例：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/connect-to-application-migration-service-data-and-control-planes-over-a-private-network.html)在您與 Application Migration Service AWS 建立連線並安裝複寫代理程式之後，請依照 [Application Migration Service 文件](https://docs.aws.amazon.com/mgn/latest/ug/migration-workflow-gs.html)的指示，將來源伺服器遷移至目標 VPC 和子網路。 | 遷移工程師 | 

## 相關資源
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-resources"></a>

**Application Migration Service 文件**
+ [概念](https://docs.aws.amazon.com/mgn/latest/ug/CloudEndure-Concepts.html)
+ [遷移工作流程](https://docs.aws.amazon.com/mgn/latest/ug/migration-workflow-gs.html)
+ [快速入門指南](https://docs.aws.amazon.com/mgn/latest/ug/quick-start-guide-gs.html)
+ [常見問答集](https://docs.aws.amazon.com/mgn/latest/ug/FAQ.html)
+ [疑難排解](https://docs.aws.amazon.com/mgn/latest/ug/troubleshooting.html)

**其他資源**
+ [AWS 使用 VPC 介面端點在 上的多帳戶架構中重新託管您的應用程式](https://docs.aws.amazon.com/prescriptive-guidance/latest/rehost-multi-account-architecture-interface-endpoints/) (AWS 方案指引指南）
+ [AWS Application Migration Service – 技術簡介](https://www.aws.training/Details/eLearning?id=71732) (AWS 培訓和認證演練）
+ [AWS Application Migration Service 架構和網路架構](https://youtu.be/ao8geVzmmRo) （影片）

## 其他資訊
<a name="connect-to-application-migration-service-data-and-control-planes-over-a-private-network-additional"></a>

針對 **Linux 伺服器上的複寫代理程式安裝****進行故障診斷 ***AWS *

如果您在 Amazon Linux 伺服器上收到 **gcc** 錯誤，請設定套件儲存庫，並使用下列命令：

```
## sudo yum groupinstall "Development Tools"
```