

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 边缘基础设施管理
<a name="infrastructure-mgmt"></a>

AWS 提供完全托管的服务，可将 AWS 基础架构 APIs、服务和工具扩展到更靠近最终用户和数据中心的距离。Outposts 和 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 中部署服务。以下各节提供了部署边缘服务的示例。

### 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
```

### 边缘应用程序负载均衡器
<a name="alb-edge"></a>

以下`create-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) | [共享子网、本地区域和波长区域中的 Amazon ECS 应用程序](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-regions-zones.html) | 
| Amazon RDS | [亚马逊 RDS 开启 AWS Outposts](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) | 选择本地区域子网 | 
| Amazon S3 | [开始在 Outposts 上使用亚马逊 S3](https://docs.aws.amazon.com/AmazonS3/latest/s3-outposts/S3OutpostsGS.html) | 不可用 | 
| Amazon ElastiCache | [将 Outposts 与 ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ElastiCache-Outposts.html) | [将 Local Zones 与 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 Elastic Disaster Recovery | [使用 AWS Elastic Disaster Recovery 和 AWS Outposts](https://docs.aws.amazon.com/drs/latest/userguide/outposts.html) | 不可用 | 
| AWS Application Migration Service | 不可用 | 选择本地区域子网作为暂存子网 | 

## 前哨基地专用的 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 来创建 [Outp](https://docs.aws.amazon.com/outposts/latest/APIReference/API_Operations.html) osts 站点、创建 Outposts 和创建 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 您可以使用和创建和修改 LGW 路由。 AWS SDKs 有关管理 LGW 的更多信息，请参阅以下资源：
+ [AWS CLI 适用于亚马逊 EC2](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/index.html)
+ EC2.Client 在 [AWS SDK for Python (Boto)](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>

为 AWS 服务 此，Outposts 和 Local Zones 均可用，指标和日志的管理方式与区域相同。亚马逊 CloudWatch 提供了专门用于监控 Outposts 的以下维度的指标：


| **维度** | **说明** | 
| --- | --- | 
| `Account` | 使用容量的账户或服务 | 
| `InstanceFamily` | 实例系列 | 
| `InstanceType` | 实例类型 | 
| `OutpostId` | 前哨基地的 ID | 
| `VolumeType` | EBS 卷类型 | 
| `VirtualInterfaceId` | 本地网关或服务链路虚拟接口 (VIF) 的 ID | 
| `VirtualInterfaceGroupId` | 本地网关 VIF 的 VIF 组的 ID | 

有关更多信息，请参阅 Outp [osts 文档中的 Outposts 机架CloudWatch 指标](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-cloudwatch-metrics.html)。