1. Packages
  2. AWS
  3. API Docs
  4. synthetics
  5. Canary
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.synthetics.Canary

Explore with Pulumi AI

Provides a Synthetics Canary resource.

NOTE: When you create a canary, AWS creates supporting implicit resources. See the Amazon CloudWatch Synthetics documentation on DeleteCanary for a full list. Neither AWS nor this provider deletes these implicit resources automatically when the canary is deleted. Before deleting a canary, ensure you have all the information about the canary that you need to delete the implicit resources using the AWS Console, or AWS CLI.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const some = new aws.synthetics.Canary("some", {
    name: "some-canary",
    artifactS3Location: "s3://some-bucket/",
    executionRoleArn: "some-role",
    handler: "exports.handler",
    zipFile: "test-fixtures/lambdatest.zip",
    runtimeVersion: "syn-1.0",
    schedule: {
        expression: "rate(0 minute)",
    },
});
Copy
import pulumi
import pulumi_aws as aws

some = aws.synthetics.Canary("some",
    name="some-canary",
    artifact_s3_location="s3://some-bucket/",
    execution_role_arn="some-role",
    handler="exports.handler",
    zip_file="test-fixtures/lambdatest.zip",
    runtime_version="syn-1.0",
    schedule={
        "expression": "rate(0 minute)",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := synthetics.NewCanary(ctx, "some", &synthetics.CanaryArgs{
			Name:               pulumi.String("some-canary"),
			ArtifactS3Location: pulumi.String("s3://some-bucket/"),
			ExecutionRoleArn:   pulumi.String("some-role"),
			Handler:            pulumi.String("exports.handler"),
			ZipFile:            pulumi.String("test-fixtures/lambdatest.zip"),
			RuntimeVersion:     pulumi.String("syn-1.0"),
			Schedule: &synthetics.CanaryScheduleArgs{
				Expression: pulumi.String("rate(0 minute)"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var some = new Aws.Synthetics.Canary("some", new()
    {
        Name = "some-canary",
        ArtifactS3Location = "s3://some-bucket/",
        ExecutionRoleArn = "some-role",
        Handler = "exports.handler",
        ZipFile = "test-fixtures/lambdatest.zip",
        RuntimeVersion = "syn-1.0",
        Schedule = new Aws.Synthetics.Inputs.CanaryScheduleArgs
        {
            Expression = "rate(0 minute)",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.synthetics.Canary;
import com.pulumi.aws.synthetics.CanaryArgs;
import com.pulumi.aws.synthetics.inputs.CanaryScheduleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var some = new Canary("some", CanaryArgs.builder()
            .name("some-canary")
            .artifactS3Location("s3://some-bucket/")
            .executionRoleArn("some-role")
            .handler("exports.handler")
            .zipFile("test-fixtures/lambdatest.zip")
            .runtimeVersion("syn-1.0")
            .schedule(CanaryScheduleArgs.builder()
                .expression("rate(0 minute)")
                .build())
            .build());

    }
}
Copy
resources:
  some:
    type: aws:synthetics:Canary
    properties:
      name: some-canary
      artifactS3Location: s3://some-bucket/
      executionRoleArn: some-role
      handler: exports.handler
      zipFile: test-fixtures/lambdatest.zip
      runtimeVersion: syn-1.0
      schedule:
        expression: rate(0 minute)
Copy

Create Canary Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Canary(name: string, args: CanaryArgs, opts?: CustomResourceOptions);
@overload
def Canary(resource_name: str,
           args: CanaryArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Canary(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           schedule: Optional[CanaryScheduleArgs] = None,
           handler: Optional[str] = None,
           runtime_version: Optional[str] = None,
           execution_role_arn: Optional[str] = None,
           artifact_s3_location: Optional[str] = None,
           delete_lambda: Optional[bool] = None,
           name: Optional[str] = None,
           run_config: Optional[CanaryRunConfigArgs] = None,
           zip_file: Optional[str] = None,
           failure_retention_period: Optional[int] = None,
           s3_key: Optional[str] = None,
           s3_version: Optional[str] = None,
           artifact_config: Optional[CanaryArtifactConfigArgs] = None,
           start_canary: Optional[bool] = None,
           success_retention_period: Optional[int] = None,
           tags: Optional[Mapping[str, str]] = None,
           vpc_config: Optional[CanaryVpcConfigArgs] = None,
           s3_bucket: Optional[str] = None)
func NewCanary(ctx *Context, name string, args CanaryArgs, opts ...ResourceOption) (*Canary, error)
public Canary(string name, CanaryArgs args, CustomResourceOptions? opts = null)
public Canary(String name, CanaryArgs args)
public Canary(String name, CanaryArgs args, CustomResourceOptions options)
type: aws:synthetics:Canary
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CanaryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CanaryArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CanaryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CanaryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CanaryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var canaryResource = new Aws.Synthetics.Canary("canaryResource", new()
{
    Schedule = new Aws.Synthetics.Inputs.CanaryScheduleArgs
    {
        Expression = "string",
        DurationInSeconds = 0,
    },
    Handler = "string",
    RuntimeVersion = "string",
    ExecutionRoleArn = "string",
    ArtifactS3Location = "string",
    DeleteLambda = false,
    Name = "string",
    RunConfig = new Aws.Synthetics.Inputs.CanaryRunConfigArgs
    {
        ActiveTracing = false,
        EnvironmentVariables = 
        {
            { "string", "string" },
        },
        MemoryInMb = 0,
        TimeoutInSeconds = 0,
    },
    ZipFile = "string",
    FailureRetentionPeriod = 0,
    S3Key = "string",
    S3Version = "string",
    ArtifactConfig = new Aws.Synthetics.Inputs.CanaryArtifactConfigArgs
    {
        S3Encryption = new Aws.Synthetics.Inputs.CanaryArtifactConfigS3EncryptionArgs
        {
            EncryptionMode = "string",
            KmsKeyArn = "string",
        },
    },
    StartCanary = false,
    SuccessRetentionPeriod = 0,
    Tags = 
    {
        { "string", "string" },
    },
    VpcConfig = new Aws.Synthetics.Inputs.CanaryVpcConfigArgs
    {
        SecurityGroupIds = new[]
        {
            "string",
        },
        SubnetIds = new[]
        {
            "string",
        },
        VpcId = "string",
    },
    S3Bucket = "string",
});
Copy
example, err := synthetics.NewCanary(ctx, "canaryResource", &synthetics.CanaryArgs{
	Schedule: &synthetics.CanaryScheduleArgs{
		Expression:        pulumi.String("string"),
		DurationInSeconds: pulumi.Int(0),
	},
	Handler:            pulumi.String("string"),
	RuntimeVersion:     pulumi.String("string"),
	ExecutionRoleArn:   pulumi.String("string"),
	ArtifactS3Location: pulumi.String("string"),
	DeleteLambda:       pulumi.Bool(false),
	Name:               pulumi.String("string"),
	RunConfig: &synthetics.CanaryRunConfigArgs{
		ActiveTracing: pulumi.Bool(false),
		EnvironmentVariables: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		MemoryInMb:       pulumi.Int(0),
		TimeoutInSeconds: pulumi.Int(0),
	},
	ZipFile:                pulumi.String("string"),
	FailureRetentionPeriod: pulumi.Int(0),
	S3Key:                  pulumi.String("string"),
	S3Version:              pulumi.String("string"),
	ArtifactConfig: &synthetics.CanaryArtifactConfigArgs{
		S3Encryption: &synthetics.CanaryArtifactConfigS3EncryptionArgs{
			EncryptionMode: pulumi.String("string"),
			KmsKeyArn:      pulumi.String("string"),
		},
	},
	StartCanary:            pulumi.Bool(false),
	SuccessRetentionPeriod: pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VpcConfig: &synthetics.CanaryVpcConfigArgs{
		SecurityGroupIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		SubnetIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		VpcId: pulumi.String("string"),
	},
	S3Bucket: pulumi.String("string"),
})
Copy
var canaryResource = new Canary("canaryResource", CanaryArgs.builder()
    .schedule(CanaryScheduleArgs.builder()
        .expression("string")
        .durationInSeconds(0)
        .build())
    .handler("string")
    .runtimeVersion("string")
    .executionRoleArn("string")
    .artifactS3Location("string")
    .deleteLambda(false)
    .name("string")
    .runConfig(CanaryRunConfigArgs.builder()
        .activeTracing(false)
        .environmentVariables(Map.of("string", "string"))
        .memoryInMb(0)
        .timeoutInSeconds(0)
        .build())
    .zipFile("string")
    .failureRetentionPeriod(0)
    .s3Key("string")
    .s3Version("string")
    .artifactConfig(CanaryArtifactConfigArgs.builder()
        .s3Encryption(CanaryArtifactConfigS3EncryptionArgs.builder()
            .encryptionMode("string")
            .kmsKeyArn("string")
            .build())
        .build())
    .startCanary(false)
    .successRetentionPeriod(0)
    .tags(Map.of("string", "string"))
    .vpcConfig(CanaryVpcConfigArgs.builder()
        .securityGroupIds("string")
        .subnetIds("string")
        .vpcId("string")
        .build())
    .s3Bucket("string")
    .build());
Copy
canary_resource = aws.synthetics.Canary("canaryResource",
    schedule={
        "expression": "string",
        "duration_in_seconds": 0,
    },
    handler="string",
    runtime_version="string",
    execution_role_arn="string",
    artifact_s3_location="string",
    delete_lambda=False,
    name="string",
    run_config={
        "active_tracing": False,
        "environment_variables": {
            "string": "string",
        },
        "memory_in_mb": 0,
        "timeout_in_seconds": 0,
    },
    zip_file="string",
    failure_retention_period=0,
    s3_key="string",
    s3_version="string",
    artifact_config={
        "s3_encryption": {
            "encryption_mode": "string",
            "kms_key_arn": "string",
        },
    },
    start_canary=False,
    success_retention_period=0,
    tags={
        "string": "string",
    },
    vpc_config={
        "security_group_ids": ["string"],
        "subnet_ids": ["string"],
        "vpc_id": "string",
    },
    s3_bucket="string")
Copy
const canaryResource = new aws.synthetics.Canary("canaryResource", {
    schedule: {
        expression: "string",
        durationInSeconds: 0,
    },
    handler: "string",
    runtimeVersion: "string",
    executionRoleArn: "string",
    artifactS3Location: "string",
    deleteLambda: false,
    name: "string",
    runConfig: {
        activeTracing: false,
        environmentVariables: {
            string: "string",
        },
        memoryInMb: 0,
        timeoutInSeconds: 0,
    },
    zipFile: "string",
    failureRetentionPeriod: 0,
    s3Key: "string",
    s3Version: "string",
    artifactConfig: {
        s3Encryption: {
            encryptionMode: "string",
            kmsKeyArn: "string",
        },
    },
    startCanary: false,
    successRetentionPeriod: 0,
    tags: {
        string: "string",
    },
    vpcConfig: {
        securityGroupIds: ["string"],
        subnetIds: ["string"],
        vpcId: "string",
    },
    s3Bucket: "string",
});
Copy
type: aws:synthetics:Canary
properties:
    artifactConfig:
        s3Encryption:
            encryptionMode: string
            kmsKeyArn: string
    artifactS3Location: string
    deleteLambda: false
    executionRoleArn: string
    failureRetentionPeriod: 0
    handler: string
    name: string
    runConfig:
        activeTracing: false
        environmentVariables:
            string: string
        memoryInMb: 0
        timeoutInSeconds: 0
    runtimeVersion: string
    s3Bucket: string
    s3Key: string
    s3Version: string
    schedule:
        durationInSeconds: 0
        expression: string
    startCanary: false
    successRetentionPeriod: 0
    tags:
        string: string
    vpcConfig:
        securityGroupIds:
            - string
        subnetIds:
            - string
        vpcId: string
    zipFile: string
Copy

Canary Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Canary resource accepts the following input properties:

ArtifactS3Location This property is required. string
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
ExecutionRoleArn This property is required. string
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
Handler This property is required. string
Entry point to use for the source code when running the canary. This value must end with the string .handler .
RuntimeVersion This property is required. string
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
Schedule This property is required. CanarySchedule

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

ArtifactConfig CanaryArtifactConfig
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
DeleteLambda bool
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
FailureRetentionPeriod int
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Name Changes to this property will trigger replacement. string
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
RunConfig CanaryRunConfig
Configuration block for individual canary runs. Detailed below.
S3Bucket string
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
S3Key string
S3 key of your script. Conflicts with zip_file.
S3Version string
S3 version ID of your script. Conflicts with zip_file.
StartCanary bool
Whether to run or stop the canary.
SuccessRetentionPeriod int
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Tags Dictionary<string, string>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
VpcConfig CanaryVpcConfig
Configuration block. Detailed below.
ZipFile string
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
ArtifactS3Location This property is required. string
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
ExecutionRoleArn This property is required. string
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
Handler This property is required. string
Entry point to use for the source code when running the canary. This value must end with the string .handler .
RuntimeVersion This property is required. string
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
Schedule This property is required. CanaryScheduleArgs

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

ArtifactConfig CanaryArtifactConfigArgs
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
DeleteLambda bool
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
FailureRetentionPeriod int
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Name Changes to this property will trigger replacement. string
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
RunConfig CanaryRunConfigArgs
Configuration block for individual canary runs. Detailed below.
S3Bucket string
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
S3Key string
S3 key of your script. Conflicts with zip_file.
S3Version string
S3 version ID of your script. Conflicts with zip_file.
StartCanary bool
Whether to run or stop the canary.
SuccessRetentionPeriod int
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Tags map[string]string
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
VpcConfig CanaryVpcConfigArgs
Configuration block. Detailed below.
ZipFile string
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
artifactS3Location This property is required. String
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
executionRoleArn This property is required. String
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
handler This property is required. String
Entry point to use for the source code when running the canary. This value must end with the string .handler .
runtimeVersion This property is required. String
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
schedule This property is required. CanarySchedule

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

artifactConfig CanaryArtifactConfig
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
deleteLambda Boolean
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
failureRetentionPeriod Integer
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
name Changes to this property will trigger replacement. String
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
runConfig CanaryRunConfig
Configuration block for individual canary runs. Detailed below.
s3Bucket String
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3Key String
S3 key of your script. Conflicts with zip_file.
s3Version String
S3 version ID of your script. Conflicts with zip_file.
startCanary Boolean
Whether to run or stop the canary.
successRetentionPeriod Integer
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags Map<String,String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpcConfig CanaryVpcConfig
Configuration block. Detailed below.
zipFile String
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
artifactS3Location This property is required. string
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
executionRoleArn This property is required. string
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
handler This property is required. string
Entry point to use for the source code when running the canary. This value must end with the string .handler .
runtimeVersion This property is required. string
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
schedule This property is required. CanarySchedule

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

artifactConfig CanaryArtifactConfig
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
deleteLambda boolean
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
failureRetentionPeriod number
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
name Changes to this property will trigger replacement. string
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
runConfig CanaryRunConfig
Configuration block for individual canary runs. Detailed below.
s3Bucket string
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3Key string
S3 key of your script. Conflicts with zip_file.
s3Version string
S3 version ID of your script. Conflicts with zip_file.
startCanary boolean
Whether to run or stop the canary.
successRetentionPeriod number
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags {[key: string]: string}
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpcConfig CanaryVpcConfig
Configuration block. Detailed below.
zipFile string
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
artifact_s3_location This property is required. str
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
execution_role_arn This property is required. str
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
handler This property is required. str
Entry point to use for the source code when running the canary. This value must end with the string .handler .
runtime_version This property is required. str
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
schedule This property is required. CanaryScheduleArgs

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

artifact_config CanaryArtifactConfigArgs
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
delete_lambda bool
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
failure_retention_period int
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
name Changes to this property will trigger replacement. str
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
run_config CanaryRunConfigArgs
Configuration block for individual canary runs. Detailed below.
s3_bucket str
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3_key str
S3 key of your script. Conflicts with zip_file.
s3_version str
S3 version ID of your script. Conflicts with zip_file.
start_canary bool
Whether to run or stop the canary.
success_retention_period int
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags Mapping[str, str]
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpc_config CanaryVpcConfigArgs
Configuration block. Detailed below.
zip_file str
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
artifactS3Location This property is required. String
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
executionRoleArn This property is required. String
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
handler This property is required. String
Entry point to use for the source code when running the canary. This value must end with the string .handler .
runtimeVersion This property is required. String
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
schedule This property is required. Property Map

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

artifactConfig Property Map
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
deleteLambda Boolean
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
failureRetentionPeriod Number
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
name Changes to this property will trigger replacement. String
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
runConfig Property Map
Configuration block for individual canary runs. Detailed below.
s3Bucket String
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3Key String
S3 key of your script. Conflicts with zip_file.
s3Version String
S3 version ID of your script. Conflicts with zip_file.
startCanary Boolean
Whether to run or stop the canary.
successRetentionPeriod Number
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags Map<String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
vpcConfig Property Map
Configuration block. Detailed below.
zipFile String
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.

Outputs

All input properties are implicitly available as output properties. Additionally, the Canary resource produces the following output properties:

Arn string
Amazon Resource Name (ARN) of the Canary.
EngineArn string
ARN of the Lambda function that is used as your canary's engine.
Id string
The provider-assigned unique ID for this managed resource.
SourceLocationArn string
ARN of the Lambda layer where Synthetics stores the canary script code.
Status string
Canary status.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timelines List<CanaryTimeline>
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
Arn string
Amazon Resource Name (ARN) of the Canary.
EngineArn string
ARN of the Lambda function that is used as your canary's engine.
Id string
The provider-assigned unique ID for this managed resource.
SourceLocationArn string
ARN of the Lambda layer where Synthetics stores the canary script code.
Status string
Canary status.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timelines []CanaryTimeline
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
arn String
Amazon Resource Name (ARN) of the Canary.
engineArn String
ARN of the Lambda function that is used as your canary's engine.
id String
The provider-assigned unique ID for this managed resource.
sourceLocationArn String
ARN of the Lambda layer where Synthetics stores the canary script code.
status String
Canary status.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines List<CanaryTimeline>
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
arn string
Amazon Resource Name (ARN) of the Canary.
engineArn string
ARN of the Lambda function that is used as your canary's engine.
id string
The provider-assigned unique ID for this managed resource.
sourceLocationArn string
ARN of the Lambda layer where Synthetics stores the canary script code.
status string
Canary status.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines CanaryTimeline[]
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
arn str
Amazon Resource Name (ARN) of the Canary.
engine_arn str
ARN of the Lambda function that is used as your canary's engine.
id str
The provider-assigned unique ID for this managed resource.
source_location_arn str
ARN of the Lambda layer where Synthetics stores the canary script code.
status str
Canary status.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines Sequence[CanaryTimeline]
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
arn String
Amazon Resource Name (ARN) of the Canary.
engineArn String
ARN of the Lambda function that is used as your canary's engine.
id String
The provider-assigned unique ID for this managed resource.
sourceLocationArn String
ARN of the Lambda layer where Synthetics stores the canary script code.
status String
Canary status.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines List<Property Map>
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.

Look up Existing Canary Resource

Get an existing Canary resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CanaryState, opts?: CustomResourceOptions): Canary
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        artifact_config: Optional[CanaryArtifactConfigArgs] = None,
        artifact_s3_location: Optional[str] = None,
        delete_lambda: Optional[bool] = None,
        engine_arn: Optional[str] = None,
        execution_role_arn: Optional[str] = None,
        failure_retention_period: Optional[int] = None,
        handler: Optional[str] = None,
        name: Optional[str] = None,
        run_config: Optional[CanaryRunConfigArgs] = None,
        runtime_version: Optional[str] = None,
        s3_bucket: Optional[str] = None,
        s3_key: Optional[str] = None,
        s3_version: Optional[str] = None,
        schedule: Optional[CanaryScheduleArgs] = None,
        source_location_arn: Optional[str] = None,
        start_canary: Optional[bool] = None,
        status: Optional[str] = None,
        success_retention_period: Optional[int] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        timelines: Optional[Sequence[CanaryTimelineArgs]] = None,
        vpc_config: Optional[CanaryVpcConfigArgs] = None,
        zip_file: Optional[str] = None) -> Canary
func GetCanary(ctx *Context, name string, id IDInput, state *CanaryState, opts ...ResourceOption) (*Canary, error)
public static Canary Get(string name, Input<string> id, CanaryState? state, CustomResourceOptions? opts = null)
public static Canary get(String name, Output<String> id, CanaryState state, CustomResourceOptions options)
resources:  _:    type: aws:synthetics:Canary    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
Amazon Resource Name (ARN) of the Canary.
ArtifactConfig CanaryArtifactConfig
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
ArtifactS3Location string
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
DeleteLambda bool
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
EngineArn string
ARN of the Lambda function that is used as your canary's engine.
ExecutionRoleArn string
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
FailureRetentionPeriod int
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Handler string
Entry point to use for the source code when running the canary. This value must end with the string .handler .
Name Changes to this property will trigger replacement. string
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
RunConfig CanaryRunConfig
Configuration block for individual canary runs. Detailed below.
RuntimeVersion string
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
S3Bucket string
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
S3Key string
S3 key of your script. Conflicts with zip_file.
S3Version string
S3 version ID of your script. Conflicts with zip_file.
Schedule CanarySchedule

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

SourceLocationArn string
ARN of the Lambda layer where Synthetics stores the canary script code.
StartCanary bool
Whether to run or stop the canary.
Status string
Canary status.
SuccessRetentionPeriod int
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Tags Dictionary<string, string>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timelines List<CanaryTimeline>
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
VpcConfig CanaryVpcConfig
Configuration block. Detailed below.
ZipFile string
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
Arn string
Amazon Resource Name (ARN) of the Canary.
ArtifactConfig CanaryArtifactConfigArgs
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
ArtifactS3Location string
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
DeleteLambda bool
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
EngineArn string
ARN of the Lambda function that is used as your canary's engine.
ExecutionRoleArn string
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
FailureRetentionPeriod int
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Handler string
Entry point to use for the source code when running the canary. This value must end with the string .handler .
Name Changes to this property will trigger replacement. string
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
RunConfig CanaryRunConfigArgs
Configuration block for individual canary runs. Detailed below.
RuntimeVersion string
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
S3Bucket string
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
S3Key string
S3 key of your script. Conflicts with zip_file.
S3Version string
S3 version ID of your script. Conflicts with zip_file.
Schedule CanaryScheduleArgs

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

SourceLocationArn string
ARN of the Lambda layer where Synthetics stores the canary script code.
StartCanary bool
Whether to run or stop the canary.
Status string
Canary status.
SuccessRetentionPeriod int
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
Tags map[string]string
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timelines []CanaryTimelineArgs
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
VpcConfig CanaryVpcConfigArgs
Configuration block. Detailed below.
ZipFile string
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
arn String
Amazon Resource Name (ARN) of the Canary.
artifactConfig CanaryArtifactConfig
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
artifactS3Location String
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
deleteLambda Boolean
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
engineArn String
ARN of the Lambda function that is used as your canary's engine.
executionRoleArn String
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
failureRetentionPeriod Integer
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
handler String
Entry point to use for the source code when running the canary. This value must end with the string .handler .
name Changes to this property will trigger replacement. String
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
runConfig CanaryRunConfig
Configuration block for individual canary runs. Detailed below.
runtimeVersion String
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
s3Bucket String
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3Key String
S3 key of your script. Conflicts with zip_file.
s3Version String
S3 version ID of your script. Conflicts with zip_file.
schedule CanarySchedule

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

sourceLocationArn String
ARN of the Lambda layer where Synthetics stores the canary script code.
startCanary Boolean
Whether to run or stop the canary.
status String
Canary status.
successRetentionPeriod Integer
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags Map<String,String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines List<CanaryTimeline>
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
vpcConfig CanaryVpcConfig
Configuration block. Detailed below.
zipFile String
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
arn string
Amazon Resource Name (ARN) of the Canary.
artifactConfig CanaryArtifactConfig
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
artifactS3Location string
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
deleteLambda boolean
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
engineArn string
ARN of the Lambda function that is used as your canary's engine.
executionRoleArn string
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
failureRetentionPeriod number
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
handler string
Entry point to use for the source code when running the canary. This value must end with the string .handler .
name Changes to this property will trigger replacement. string
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
runConfig CanaryRunConfig
Configuration block for individual canary runs. Detailed below.
runtimeVersion string
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
s3Bucket string
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3Key string
S3 key of your script. Conflicts with zip_file.
s3Version string
S3 version ID of your script. Conflicts with zip_file.
schedule CanarySchedule

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

sourceLocationArn string
ARN of the Lambda layer where Synthetics stores the canary script code.
startCanary boolean
Whether to run or stop the canary.
status string
Canary status.
successRetentionPeriod number
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags {[key: string]: string}
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines CanaryTimeline[]
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
vpcConfig CanaryVpcConfig
Configuration block. Detailed below.
zipFile string
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
arn str
Amazon Resource Name (ARN) of the Canary.
artifact_config CanaryArtifactConfigArgs
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
artifact_s3_location str
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
delete_lambda bool
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
engine_arn str
ARN of the Lambda function that is used as your canary's engine.
execution_role_arn str
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
failure_retention_period int
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
handler str
Entry point to use for the source code when running the canary. This value must end with the string .handler .
name Changes to this property will trigger replacement. str
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
run_config CanaryRunConfigArgs
Configuration block for individual canary runs. Detailed below.
runtime_version str
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
s3_bucket str
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3_key str
S3 key of your script. Conflicts with zip_file.
s3_version str
S3 version ID of your script. Conflicts with zip_file.
schedule CanaryScheduleArgs

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

source_location_arn str
ARN of the Lambda layer where Synthetics stores the canary script code.
start_canary bool
Whether to run or stop the canary.
status str
Canary status.
success_retention_period int
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags Mapping[str, str]
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines Sequence[CanaryTimelineArgs]
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
vpc_config CanaryVpcConfigArgs
Configuration block. Detailed below.
zip_file str
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.
arn String
Amazon Resource Name (ARN) of the Canary.
artifactConfig Property Map
configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See Artifact Config.
artifactS3Location String
Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
deleteLambda Boolean
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
engineArn String
ARN of the Lambda function that is used as your canary's engine.
executionRoleArn String
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
failureRetentionPeriod Number
Number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
handler String
Entry point to use for the source code when running the canary. This value must end with the string .handler .
name Changes to this property will trigger replacement. String
Name for this canary. Has a maximum length of 21 characters. Valid characters are lowercase alphanumeric, hyphen, or underscore.
runConfig Property Map
Configuration block for individual canary runs. Detailed below.
runtimeVersion String
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0, syn-nodejs-puppeteer-3.0, syn-nodejs-2.2, syn-nodejs-2.1, syn-nodejs-2.0, and syn-1.0.
s3Bucket String
Full bucket name which is used if your canary script is located in S3. The bucket must already exist. Conflicts with zip_file.
s3Key String
S3 key of your script. Conflicts with zip_file.
s3Version String
S3 version ID of your script. Conflicts with zip_file.
schedule Property Map

Configuration block providing how often the canary is to run and when these test runs are to stop. Detailed below.

The following arguments are optional:

sourceLocationArn String
ARN of the Lambda layer where Synthetics stores the canary script code.
startCanary Boolean
Whether to run or stop the canary.
status String
Canary status.
successRetentionPeriod Number
Number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
tags Map<String>
Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timelines List<Property Map>
Structure that contains information about when the canary was created, modified, and most recently run. see Timeline.
vpcConfig Property Map
Configuration block. Detailed below.
zipFile String
ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with s3_bucket, s3_key, and s3_version.

Supporting Types

CanaryArtifactConfig
, CanaryArtifactConfigArgs

S3Encryption CanaryArtifactConfigS3Encryption
Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
S3Encryption CanaryArtifactConfigS3Encryption
Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
s3Encryption CanaryArtifactConfigS3Encryption
Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
s3Encryption CanaryArtifactConfigS3Encryption
Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
s3_encryption CanaryArtifactConfigS3Encryption
Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.
s3Encryption Property Map
Configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. See S3 Encryption.

CanaryArtifactConfigS3Encryption
, CanaryArtifactConfigS3EncryptionArgs

EncryptionMode string
The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3 and SSE_KMS.
KmsKeyArn string
The ARN of the customer-managed KMS key to use, if you specify SSE_KMS for encryption_mode.
EncryptionMode string
The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3 and SSE_KMS.
KmsKeyArn string
The ARN of the customer-managed KMS key to use, if you specify SSE_KMS for encryption_mode.
encryptionMode String
The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3 and SSE_KMS.
kmsKeyArn String
The ARN of the customer-managed KMS key to use, if you specify SSE_KMS for encryption_mode.
encryptionMode string
The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3 and SSE_KMS.
kmsKeyArn string
The ARN of the customer-managed KMS key to use, if you specify SSE_KMS for encryption_mode.
encryption_mode str
The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3 and SSE_KMS.
kms_key_arn str
The ARN of the customer-managed KMS key to use, if you specify SSE_KMS for encryption_mode.
encryptionMode String
The encryption method to use for artifacts created by this canary. Valid values are: SSE_S3 and SSE_KMS.
kmsKeyArn String
The ARN of the customer-managed KMS key to use, if you specify SSE_KMS for encryption_mode.

CanaryRunConfig
, CanaryRunConfigArgs

ActiveTracing bool
Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
EnvironmentVariables Dictionary<string, string>
Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
MemoryInMb int
Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
TimeoutInSeconds int
Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
ActiveTracing bool
Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
EnvironmentVariables map[string]string
Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
MemoryInMb int
Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
TimeoutInSeconds int
Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
activeTracing Boolean
Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
environmentVariables Map<String,String>
Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
memoryInMb Integer
Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
timeoutInSeconds Integer
Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
activeTracing boolean
Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
environmentVariables {[key: string]: string}
Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
memoryInMb number
Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
timeoutInSeconds number
Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
active_tracing bool
Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
environment_variables Mapping[str, str]
Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
memory_in_mb int
Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
timeout_in_seconds int
Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).
activeTracing Boolean
Whether this canary is to use active AWS X-Ray tracing when it runs. You can enable active tracing only for canaries that use version syn-nodejs-2.0 or later for their canary runtime.
environmentVariables Map<String>
Map of environment variables that are accessible from the canary during execution. Please see AWS Docs for variables reserved for Lambda.
memoryInMb Number
Maximum amount of memory available to the canary while it is running, in MB. The value you specify must be a multiple of 64.
timeoutInSeconds Number
Number of seconds the canary is allowed to run before it must stop. If you omit this field, the frequency of the canary is used, up to a maximum of 840 (14 minutes).

CanarySchedule
, CanaryScheduleArgs

Expression This property is required. string
Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can be minute, minutes, or hour. For cron expression, the syntax is cron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
DurationInSeconds int
Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
Expression This property is required. string
Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can be minute, minutes, or hour. For cron expression, the syntax is cron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
DurationInSeconds int
Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
expression This property is required. String
Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can be minute, minutes, or hour. For cron expression, the syntax is cron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
durationInSeconds Integer
Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
expression This property is required. string
Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can be minute, minutes, or hour. For cron expression, the syntax is cron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
durationInSeconds number
Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
expression This property is required. str
Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can be minute, minutes, or hour. For cron expression, the syntax is cron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
duration_in_seconds int
Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
expression This property is required. String
Rate expression or cron expression that defines how often the canary is to run. For rate expression, the syntax is rate(number unit). unit can be minute, minutes, or hour. For cron expression, the syntax is cron(expression). For more information about the syntax for cron expressions, see Scheduling canary runs using cron.
durationInSeconds Number
Duration in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.

CanaryTimeline
, CanaryTimelineArgs

Created string
Date and time the canary was created.
LastModified string
Date and time the canary was most recently modified.
LastStarted string
Date and time that the canary's most recent run started.
LastStopped string
Date and time that the canary's most recent run ended.
Created string
Date and time the canary was created.
LastModified string
Date and time the canary was most recently modified.
LastStarted string
Date and time that the canary's most recent run started.
LastStopped string
Date and time that the canary's most recent run ended.
created String
Date and time the canary was created.
lastModified String
Date and time the canary was most recently modified.
lastStarted String
Date and time that the canary's most recent run started.
lastStopped String
Date and time that the canary's most recent run ended.
created string
Date and time the canary was created.
lastModified string
Date and time the canary was most recently modified.
lastStarted string
Date and time that the canary's most recent run started.
lastStopped string
Date and time that the canary's most recent run ended.
created str
Date and time the canary was created.
last_modified str
Date and time the canary was most recently modified.
last_started str
Date and time that the canary's most recent run started.
last_stopped str
Date and time that the canary's most recent run ended.
created String
Date and time the canary was created.
lastModified String
Date and time the canary was most recently modified.
lastStarted String
Date and time that the canary's most recent run started.
lastStopped String
Date and time that the canary's most recent run ended.

CanaryVpcConfig
, CanaryVpcConfigArgs

SecurityGroupIds List<string>
IDs of the security groups for this canary.
SubnetIds List<string>
IDs of the subnets where this canary is to run.
VpcId string
ID of the VPC where this canary is to run.
SecurityGroupIds []string
IDs of the security groups for this canary.
SubnetIds []string
IDs of the subnets where this canary is to run.
VpcId string
ID of the VPC where this canary is to run.
securityGroupIds List<String>
IDs of the security groups for this canary.
subnetIds List<String>
IDs of the subnets where this canary is to run.
vpcId String
ID of the VPC where this canary is to run.
securityGroupIds string[]
IDs of the security groups for this canary.
subnetIds string[]
IDs of the subnets where this canary is to run.
vpcId string
ID of the VPC where this canary is to run.
security_group_ids Sequence[str]
IDs of the security groups for this canary.
subnet_ids Sequence[str]
IDs of the subnets where this canary is to run.
vpc_id str
ID of the VPC where this canary is to run.
securityGroupIds List<String>
IDs of the security groups for this canary.
subnetIds List<String>
IDs of the subnets where this canary is to run.
vpcId String
ID of the VPC where this canary is to run.

Import

Using pulumi import, import Synthetics Canaries using the name. For example:

$ pulumi import aws:synthetics/canary:Canary some some-canary
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.