This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::Synthetics::Canary Code
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
{ "BlueprintTypes" :[ String, ... ], "Dependencies" :[ Dependency, ... ], "Handler" :String, "S3Bucket" :String, "S3Key" :String, "S3ObjectVersion" :String, "Script" :String, "SourceLocationArn" :String}
YAML
BlueprintTypes:- StringDependencies:- DependencyHandler:StringS3Bucket:StringS3Key:StringS3ObjectVersion:StringScript:StringSourceLocationArn:String
Properties
BlueprintTypes-
BlueprintTypesare a list of templates that enable simplified canary creation. You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts.multi-checksis the only supported value.When you specify
BlueprintTypes, theHandlerfield cannot be specified since the blueprint provides a pre-defined entry point.Required: No
Type: Array of String
Maximum:
1Update requires: No interruption
DependenciesProperty description not available.
Required: No
Type: Array of Dependency
Maximum:
1Update requires: No interruption
Handler-
The entry point to use for the source code when running the canary. For canaries that use the
syn-python-selenium-1.0runtime or asyn-nodejs.puppeteerruntime earlier thansyn-nodejs.puppeteer-3.4, the handler must be specified asfileName.handler. Forsyn-python-selenium-1.1,syn-nodejs.puppeteer-3.4, and later runtimes, the handler can be specified asfileName.functionName, or you can specify a folder where canary scripts reside asfolder/fileName.functionName.This field is required when you don't specify
BlueprintTypesand is not allowed when you specifyBlueprintTypes.Required: Conditional
Type: String
Pattern:
^(([0-9a-zA-Z_-]+(\/|\.))*[0-9A-Za-z_\\-]+(\.|::)[A-Za-z_][A-Za-z0-9_]*)?$Minimum:
0Maximum:
128Update 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:
1Maximum:
1024Update requires: No interruption
S3Key-
The Amazon S3 key of your script. For more information, see Working with Amazon S3 Objects.
Required: Conditional
Type: String
Minimum:
1Maximum:
1024Update requires: No interruption
S3ObjectVersion-
The Amazon S3 version ID of your script.
Required: Conditional
Type: String
Minimum:
1Maximum:
1024Update 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:
1Maximum:
1024Update requires: No interruption