

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

# 邊緣基礎設施管理
<a name="infrastructure-mgmt"></a>

AWS 提供全受管服務，可將 AWS 基礎設施、服務、APIs和工具延伸到更接近最終使用者和資料中心的位置。Outpost 和 Local Zones 中可用的服務與 中可用的服務相同 AWS 區域，因此您可以使用相同的 AWS 主控台 AWS CLI或 AWS APIs來管理這些服務。如需支援的服務，請參閱[AWS Outposts 功能比較](https://aws.amazon.com/outposts/)表和[AWS Local Zones 功能](https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/)。

## 在邊緣部署服務
<a name="deploying-services"></a>

您可以在 Local Zones 和 Outposts 中設定可用的服務，方法與在 中設定服務的方式相同 AWS 區域：使用 AWS 主控台 AWS CLI或 AWS APIs。區域和邊緣部署的主要差異是佈建資源的子網路。[節點的聯網](networking.md)部分描述了如何在 Outposts 和 Local Zones 中部署子網路。識別邊緣子網路之後，您可以使用邊緣子網路 ID 做為參數，在 Outposts 或 Local Zones 中部署服務。下列各節提供部署邊緣服務的範例。

### 邊緣的 Amazon EC2
<a name="ec2-edge"></a>

下列`run-instances`範例會在目前區域的邊緣子網路`m5.2xlarge`中啟動 類型的單一執行個體。如果您不打算使用 Linux 上的 SSH 或 Windows 上的遠端桌面通訊協定 (RDP) 連線到執行個體，則金鑰對是選用的。

```
aws ec2 run-instances \
    --image-id ami-id \
    --instance-type m5.2xlarge \
    --subnet-id <subnet-edge-id> \
    --key-name MyKeyPair
```

### 邊緣的 Application Load Balancer
<a name="alb-edge"></a>

下列`create-load-balancer`範例會建立內部 Application Load Balancer，並啟用指定子網路的 Local Zones 或 Outposts。

```
aws elbv2 create-load-balancer \
    --name my-internal-load-balancer \
    --scheme internal \
    --subnets <subnet-edge-id>
```

若要將面向網際網路的 Application Load Balancer 部署到 Outpost 上的子網路，請在 `--scheme`選項中設定 `internet-facing`旗標並提供 [CoIP 集區 ID](https://docs.aws.amazon.com/outposts/latest/userguide/local-rack.html#local-gateway-subnet)，如本範例所示：

```
aws elbv2 create-load-balancer \
    --name my-internal-load-balancer \
    --scheme internet-facing \
    --customer-owned-ipv4-pool <coip-pool-id>
    --subnets <subnet-edge-id>
```

如需有關在邊緣部署其他 服務的資訊，請遵循下列連結：


| **服務** | **AWS Outposts** | **AWS Local Zones** | 
| --- | --- | --- | 
| Amazon EKS | [使用 部署 Amazon EKS 內部部署 AWS Outposts](https://docs.aws.amazon.com/eks/latest/userguide/eks-outposts.html) | [使用 啟動低延遲 EKS 叢集 AWS Local Zones](https://docs.aws.amazon.com/eks/latest/userguide/local-zones.html) | 
| Amazon ECS | [上的 Amazon ECS AWS Outposts](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-on-outposts.html) | [共用子網路、本機區域和 Wavelength 區域中的 Amazon ECS 應用程式](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-regions-zones.html) | 
| Amazon RDS | [上的 Amazon RDS AWS Outposts](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) | 選取本機區域子網路 | 
| Amazon S3 | [Amazon S3 on Outposts 入門](https://docs.aws.amazon.com/AmazonS3/latest/s3-outposts/S3OutpostsGS.html) | 無 | 
| Amazon ElastiCache | [搭配 ElastiCache 使用 Outpost](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ElastiCache-Outposts.html) | [搭配 ElastiCache 使用本機區域](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/Local_zones.html) | 
| Amazon EMR | [上的 EMR 叢集 AWS Outposts](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-outposts.html) | [上的 EMR 叢集 AWS Local Zones](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-localzones.html) | 
| Amazon FSx | 無 | 選取本機區域子網路 | 
| AWS 彈性災難復原 | [使用 AWS 彈性災難復原 和 AWS Outposts](https://docs.aws.amazon.com/drs/latest/userguide/outposts.html) | 不適用 | 
| AWS Application Migration Service | 不適用 | 選取 Local Zone 子網路做為預備子網路 | 

## Outposts 特定的 CLI 和 SDK
<a name="cli-sdk"></a>

AWS Outposts 有兩個命令和 APIs 群組，用於建立服務訂單或操作本機閘道和本機網路之間的路由表。

### Outposts 訂購程序
<a name="outposts-ordering-process"></a>

您可以使用 [AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/outposts/index.html)或 [Outposts APIs](https://docs.aws.amazon.com/outposts/latest/APIReference/API_Operations.html) 來建立 Outposts 網站、建立 Outpost，以及建立 Outposts 訂單。我們建議您在 AWS Outposts 訂購過程中與混合雲端專家合作，以確保為您的實作需求適當選擇資源 IDs 和最佳組態。如需完整的資源 ID 清單，請參閱[AWS Outposts 機架定價](https://aws.amazon.com/outposts/rack/pricing/)頁面。

### 本機閘道管理
<a name="lgw-management"></a>

Outposts 中本機閘道 (LGW) 的管理和操作需要了解適用於此任務的 AWS CLI 和 SDK 命令。您可以使用 AWS CLI 和 AWS SDKs 來建立和修改 LGW 路由，以及其他任務。如需管理 LGW 的詳細資訊，請參閱下列資源：
+ [AWS CLI 適用於 Amazon EC2 的](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/index.html)
+ 中的 EC2.Client [適用於 Python (Boto) 的 AWS SDK](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html)
+ 中的 Ec2Client [適用於 Java 的 AWS SDK](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/ec2/Ec2Client.html)

### CloudWatch 指標和日誌
<a name="cloudwatch-metrics"></a>

對於可在 Outpost 和 Local Zones 中使用的 AWS 服務 ，指標和日誌的管理方式與區域相同。Amazon CloudWatch 提供指標，專用於監控下列維度的 Outpost：


| **維度** | **描述** | 
| --- | --- | 
| `Account` | 使用 容量的帳戶或服務 | 
| `InstanceFamily` | 執行個體系列 | 
| `InstanceType` | 執行個體類型 | 
| `OutpostId` | Outpost 的 ID | 
| `VolumeType` | EBS 磁碟區類型 | 
| `VirtualInterfaceId` | 本機閘道或服務連結虛擬界面 (VIF) 的 ID | 
| `VirtualInterfaceGroupId` | 本機閘道 VIF 的 VIF 群組 ID | 

如需詳細資訊，請參閱 [Outposts 文件中的 Outposts 機架的 CloudWatch 指標](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-cloudwatch-metrics.html)。