View a markdown version of this page

ReplicaRegions - AWS Serverless Application Model

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

ReplicaRegions

指定MultiRegion或 PerRegion Web 函数端点将函数复制到的区域。您可以指定区域代码和区域组列表,也可以指定包含区域并可选择排除其中一些区域的对象。

您可以在指定区域的任何地方使用以下区域组:

  • US: us-east-1, us-east-2, us-west-1, us-west-2

  • EU: eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-north-1

  • AP: ap-south-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-southeast-1, ap-southeast-2

  • CA: ca-central-1

  • SA: sa-east-1

  • SPARSE_GLOBAL: 每个大洲有一两个覆盖全球的区域,区域较少:us-east-1、eu-west-1、eu-central-1、ap-northeast-1、ap-southeast-1、ap-southeast-2、sa-east-1

  • ALL_STANDARD: US、、EUAPCA、和SA组中的每个区域(17 个区域)

语法

要在 AWS Serverless Application Model (AWS SAM) 模板中声明此实体,请使用以下语法。

YAML

ExcludeRegions: List IncludeRegions: List

Properties

ExcludeRegions

要从中删除的区域代码和区域组的列表IncludeRegions。您还必须指定IncludeRegions。条目不能是内部函数,也不能在IncludeRegions包含内部函数ExcludeRegions时使用。

类型:列表

必需:否

CloudFormation 兼容性:此属性是独有的 AWS SAM ,没有 CloudFormation 等效属性。

IncludeRegions

要将函数复制到的区域代码和区域组的列表。列表本身不能是内在函数,但单个条目可以。

类型:列表

必需:否

CloudFormation 兼容性:此属性类似于AWS::Lambda::WebFunctionEndpoint资源的Regions属性。 AWS SAM 展开区域组并删除所有ExcludeRegions条目以生成区域列表。

示例

地区列表

以下示例将函数复制到两个区域。

ReplicaRegions: - us-east-1 - eu-west-1

包含排除项的区域组

以下示例将该函数复制到除us-west-1之外的美国地区。

ReplicaRegions: IncludeRegions: - US ExcludeRegions: - us-west-1