

终止支持通知：2026 年 5 月 31 日， AWS 将终止对的支持。 AWS Panorama 2026 年 5 月 31 日之后，您将无法再访问 AWS Panorama 控制台或 AWS Panorama 资源。有关更多信息，请参阅[AWS Panorama 终止支持](https://docs.aws.amazon.com/panorama/latest/dev/panorama-end-of-support.html)。

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

# 使用 VPC 端点
<a name="api-endpoints"></a>

如果您在无法访问互联网的 VPC 中工作，则可以创建一个 [VPC 端点](#services-vpc-interface)以与 AWS Panorama 一起使用。VPC 端点允许在私有子网中运行的客户端无需互联网连接即可连接到 AWS 服务。

有关 AWS Panorama 设备使用的端口和端点的详细信息，请参阅 [将 AWS Panorama Appliance 连接到您的网络](appliance-network.md)。

**Topics**
+ [创建 VPC 端点](#services-vpc-interface)
+ [将设备连接到私有子网](#services-vpc-appliance)
+ [示例 AWS CloudFormation 模板](#services-vpc-templates)

## 创建 VPC 端点
<a name="services-vpc-interface"></a>

要在 VPC 和 AWS Panorama 之间建立私有连接，请创建 *VPC 端点*。使用 AWS Panorama 不需要 VPC 端点。只有在无法访问互联网的 VPC 中工作时，才需要创建 VPC 端点。当 AWS CLI 或软件开发工具包尝试连接到 AWS Panorama 时，流量将通过 VPC 端点进行路由。

使用以下设置为 AWS Panorama [创建 VPC 端点](https://console.aws.amazon.com//vpc/home#CreateVpcEndpoint:)：
+ **服务名称** – **com.amazonaws.*us-west-2*.panorama**
+ **类型** – **接口**

VPC 端点可使用服务的 DNS 名称从 AWS 软件开发工具包客户端获取流量，而无需任何额外配置。有关使用 VPC 端点的更多信息，请参阅 *Amazon VPC 用户指南*中的[接口 VPC 端点](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html)。

## 将设备连接到私有子网
<a name="services-vpc-appliance"></a>

AWS Panorama 设备可以通过私有 VPN 连接与 AWS Site-to-Site VPN 或进行连接 AWS Direct Connect。 AWS 借助这些服务，您可以创建一个延伸至数据中心的私有子网。设备连接到私有子网并通过 VPC 终端节点访问 AWS 服务。

Site-to-Site VPN 以及 Direct Connect 用于将您的数据中心安全地连接到 Amazon VPC 的服务。使用 Site-to-Site VPN，您可以使用市售的网络设备进行连接。 Direct Connect 使用 AWS 设备进行连接。

****
+ **Site-to-Site VPN** — [什么是 AWS Site-to-Site VPN？](https://docs.aws.amazon.com/vpn/latest/s2svpn/)
+ **Direct Connect** – [什么是 AWS Direct Connect？](https://docs.aws.amazon.com/directconnect/latest/UserGuide/)

将本地网络连接到 VPC 中的私有子网后，请为以下服务创建 VPC 端点。

****
+ **Amazon Simple Storage Service** – [适用于 Amazon S3 的AWS PrivateLink](https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html)
+ **AWS IoT Core** – [将 AWS IoT Core 与接口 VPC 端点配合使用](https://docs.aws.amazon.com/iot/latest/developerguide/IoTCore-VPC.html)（数据面板和凭证提供程序）
+ **Amazon Elastic 容器注册表** – [亚马逊弹性容器注册表接口 VPC 端点](https://docs.aws.amazon.com/AmazonECR/latest/userguide/vpc-endpoints.html)
+ **亚马逊 CloudWatch** — [使用 CloudWatch 接口 VPC 终端节点](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-and-interface-VPC.html)
+ **Amazon CloudWatch 日志** — [使用带有接口 VPC 终端节点的 CloudWatch 日](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch-logs-and-interface-VPC.html)志

该设备无需连接 AWS Panorama 服务。它通过中的消息渠道与 AWS Panorama 通信。 AWS IoT

除了 VPC 终端节点外，Amazon S3 和还 AWS IoT 需要使用 Amazon Route 53 私有托管区域。私有托管区域将来自子域（包括 Amazon S3 接入点和 MQTT 主题的子域）的流量路由到正确的 VPC 端点。有关私有托管区域的信息，请参阅 Amazon Route 53 开发者指南中的[使用私有托管区域](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-private.html)。

有关包含 VPC 端点和私有托管区域的 VPC 配置示例，请参阅 [示例 AWS CloudFormation 模板](#services-vpc-templates)。

## 示例 AWS CloudFormation 模板
<a name="services-vpc-templates"></a>

本指南的 GitHub 存储库提供了 AWS CloudFormation 模板，您可以使用这些模板来创建用于 AWS Panorama 的资源。这些模板创建了一个包含两个私有子网、一个公有子网和一个 VPC 端点的 VPC。您可以使用 VPC 中的私有子网来托管与互联网隔离的资源。公有子网中的资源可以与私有资源通信，但无法从互联网访问私有资源。

**Example [vpc-endpoint.yml](https://github.com/awsdocs/aws-panorama-developer-guide/blob/main/cloudformation-templates/vpc-endpoint.yml) – 私有子网**  

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  vpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 172.31.0.0/16
      EnableDnsHostnames: true
      EnableDnsSupport: true
      Tags:
        - Key: Name
          Value: !Ref AWS::StackName
  privateSubnetA:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref vpc
      AvailabilityZone:
        Fn::Select:
         - 0
         - Fn::GetAZs: ""
      CidrBlock: 172.31.3.0/24
      MapPublicIpOnLaunch: false
      Tags:
        - Key: Name
          Value: !Sub  ${AWS::StackName}-subnet-a
  ...
```

`vpc-endpoint.yml` 模板展示了如何为 AWS Panorama 创建 VPC 端点。您可以使用此终端节点通过 AWS 软件开发工具包管理 AWS Panorama 资源或 AWS CLI。

**Example [vpc-endpoint.yml](https://github.com/awsdocs/aws-panorama-developer-guide/blob/main/cloudformation-templates/vpc-endpoint.yml) – VPC 端点**  

```
  panoramaEndpoint:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      ServiceName: !Sub com.amazonaws.${AWS::Region}.panorama
      VpcId: !Ref vpc
      VpcEndpointType: Interface
      SecurityGroupIds:
      - !GetAtt vpc.DefaultSecurityGroup
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref privateSubnetA
      - !Ref privateSubnetB
      PolicyDocument:
        Version: 2012-10-17		 	 	 
        Statement:
        - Effect: Allow
          Principal: "*"
          Action:
            - "panorama:*"
          Resource:
            - "*"
```

`PolicyDocument` 是一种基于资源的权限策略，用于定义可使用端点进行的 API 调用。您可以修改策略以限制可通过端点访问的操作和资源。有关更多信息，请参阅《Amazon VPC User Guide》**中的 [Controlling access to services with VPC endpoints](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html)。

`vpc-appliance.yml` 模板展示了如何为 AWS Panorama 设备使用的服务创建 VPC 端点和私有托管区域。

**Example [vpc-appliance.yml](https://github.com/awsdocs/aws-panorama-developer-guide/blob/main/cloudformation-templates/vpc-appliance.yml) – 带有私有托管区域的 Amazon S3 接入点端点**  

```
  s3Endpoint:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      ServiceName: !Sub com.amazonaws.${AWS::Region}.s3
      VpcId: !Ref vpc
      VpcEndpointType: Interface
      SecurityGroupIds:
      - !GetAtt vpc.DefaultSecurityGroup
      PrivateDnsEnabled: false
      SubnetIds:
      - !Ref privateSubnetA
      - !Ref privateSubnetB
...
  s3apHostedZone:
    Type: AWS::Route53::HostedZone
    Properties:
      Name: !Sub s3-accesspoint.${AWS::Region}.amazonaws.com
      VPCs: 
        - VPCId: !Ref vpc
          VPCRegion: !Ref AWS::Region
  s3apRecords:
    Type: AWS::Route53::RecordSet
    Properties:
      HostedZoneId: !Ref s3apHostedZone
      Name: !Sub "*.s3-accesspoint.${AWS::Region}.amazonaws.com"
      Type: CNAME
      TTL: 600
      # first DNS entry, split on :, second value
      ResourceRecords: 
      - !Select [1, !Split [":", !Select [0, !GetAtt s3Endpoint.DnsEntries ] ] ]
```

示例模板演示了如何使用示例 VPC 创建 Amazon VPC 和 Route 53 资源。您可以通过删除 VPC 资源并将对子网、安全组和 VPC 的引用替换为您的资源来调整这些内容，以适应您的 IDs 用例。 IDs 