选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AWS::Synthetics::Canary Code

聚焦模式
AWS::Synthetics::Canary Code - AWS CloudFormation
此页面尚未翻译为您的语言。 请求翻译
筛选器视图

Use this structure to input your script code for the canary. This structure contains the Lambda handler with the location where the canary should start running the script. If the script is stored in an S3 bucket, the bucket name, key, and version are also included. If the script is passed into the canary directly, the script code is contained in the value of Script.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Handler" : String, "S3Bucket" : String, "S3Key" : String, "S3ObjectVersion" : String, "Script" : String, "SourceLocationArn" : String }

YAML

Handler: String S3Bucket: String S3Key: String S3ObjectVersion: String Script: String SourceLocationArn: String

Properties

Handler

The entry point to use for the source code when running the canary. For canaries that use the syn-python-selenium-1.0 runtime or a syn-nodejs.puppeteer runtime earlier than syn-nodejs.puppeteer-3.4, the handler must be specified as fileName.handler. For syn-python-selenium-1.1, syn-nodejs.puppeteer-3.4, and later runtimes, the handler can be specified as fileName.functionName , or you can specify a folder where canary scripts reside as folder/fileName.functionName .

Required: Conditional

Type: String

Pattern: ^([0-9a-zA-Z_-]+\/)*[0-9A-Za-z_\\-]+\.[A-Za-z_][A-Za-z0-9_]*$

Minimum: 1

Maximum: 128

Update requires: No interruption

S3Bucket

If your canary script is located in S3, specify the bucket name here. The bucket must already exist.

Required: Conditional

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

S3Key

The S3 key of your script. For more information, see Working with Amazon S3 Objects.

Required: Conditional

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

S3ObjectVersion

The S3 version ID of your script.

Required: Conditional

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

Script

If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the script in plain text. It can be up to 5 MB.

Required: Conditional

Type: String

Update requires: No interruption

SourceLocationArn

The ARN of the Lambda layer where Synthetics stores the canary script code.

Required: No

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

本页内容

下一主题:

RunConfig

上一主题:

BaseScreenshot
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。