diff --git a/packages/@aws-cdk/aws-synthetics/README.md b/packages/@aws-cdk/aws-synthetics/README.md index 77e0b90640d81..0f68a385d998c 100644 --- a/packages/@aws-cdk/aws-synthetics/README.md +++ b/packages/@aws-cdk/aws-synthetics/README.md @@ -42,7 +42,7 @@ const canary = new synthetics.Canary(this, 'MyCanary', { code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')), handler: 'index.handler', }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_7, environmentVariables: { stage: 'prod', }, @@ -129,7 +129,7 @@ new synthetics.Canary(this, 'Inline Canary', { code: synthetics.Code.fromInline('/* Synthetics handler code */'), handler: 'index.handler', // must be 'index.handler' }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_7, }); // To supply the code from your local filesystem: @@ -138,7 +138,7 @@ new synthetics.Canary(this, 'Asset Canary', { code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')), handler: 'index.handler', // must end with '.handler' }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_7, }); // To supply the code from a S3 bucket: @@ -149,7 +149,7 @@ new synthetics.Canary(this, 'Bucket Canary', { code: synthetics.Code.fromBucket(bucket, 'canary.zip'), handler: 'index.handler', // must end with '.handler' }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_7, }); ``` @@ -188,7 +188,7 @@ new synthetics.Canary(this, 'Vpc Canary', { code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')), handler: 'index.handler', }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_4, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_7, vpc, }); ``` diff --git a/packages/@aws-cdk/aws-synthetics/lib/runtime.ts b/packages/@aws-cdk/aws-synthetics/lib/runtime.ts index ebeac63284695..f6eefc5e8ddde 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/runtime.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/runtime.ts @@ -144,6 +144,16 @@ export class Runtime { */ public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_6 = new Runtime('syn-nodejs-puppeteer-3.6', RuntimeFamily.NODEJS); + /** + * `syn-nodejs-puppeteer-3.7` includes the following: + * - Lambda runtime Node.js 14.x + * - Puppeteer-core version 10.1.0 + * - Chromium version 92.0.4512 + * + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.7 + */ + public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_7 = new Runtime('syn-nodejs-puppeteer-3.7', RuntimeFamily.NODEJS); + /** * `syn-python-selenium-1.0` includes the following: * - Lambda runtime Python 3.8 diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.assets.json b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.assets.json index 34c6ee2541ad7..ca535da2aecc1 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.assets.json +++ b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb": { "source": { @@ -27,7 +27,7 @@ } } }, - "dd5cacd9987453c5d75cae0c956943b37b2fb0597ac6490e5b2e3eb1d0a5a6a0": { + "38dcc41263b1a009e2d7560d81dee9041f4f7941b66cd73b63df402a6fe3c22d": { "source": { "path": "canary-one.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5cacd9987453c5d75cae0c956943b37b2fb0597ac6490e5b2e3eb1d0a5a6a0.json", + "objectKey": "38dcc41263b1a009e2d7560d81dee9041f4f7941b66cd73b63df402a6fe3c22d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.template.json b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.template.json index a960ab9caf898..c4a1a1232eeb4 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.template.json +++ b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/canary-one.template.json @@ -728,6 +728,203 @@ "StartCanaryAfterCreation": true } }, + "MyCanaryFourArtifactsBucketE259973B": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "aws:kms" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyCanaryFourArtifactsBucketPolicy20BDB9D7": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "MyCanaryFourArtifactsBucketE259973B" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "MyCanaryFourServiceRoleA532F905": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:ListAllMyBuckets", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "s3:GetBucketLocation", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + } + }, + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + }, + "/*" + ] + ] + } + }, + { + "Action": "cloudwatch:PutMetricData", + "Condition": { + "StringEquals": { + "cloudwatch:namespace": "CloudWatchSynthetics" + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/lambda/cwsyn-*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "canaryPolicy" + } + ] + } + }, + "MyCanaryFour15095F40": { + "Type": "AWS::Synthetics::Canary", + "Properties": { + "ArtifactS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "MyCanaryFourArtifactsBucketE259973B" + } + ] + ] + }, + "Code": { + "Handler": "canary.handler", + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + }, + "ExecutionRoleArn": { + "Fn::GetAtt": [ + "MyCanaryFourServiceRoleA532F905", + "Arn" + ] + }, + "Name": "assetcanary-four", + "RuntimeVersion": "syn-nodejs-puppeteer-3.7", + "Schedule": { + "DurationInSeconds": "0", + "Expression": "rate(5 minutes)" + }, + "StartCanaryAfterCreation": true + } + }, "MyPythonCanaryArtifactsBucket7AE88133": { "Type": "AWS::S3::Bucket", "Properties": { diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/integ.json b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/integ.json index 5e35a2eb40920..c8afc51228754 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.canary": { "stacks": [ diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/manifest.json index bcfd4a7e5686f..346dbfd1f3265 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -23,7 +23,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dd5cacd9987453c5d75cae0c956943b37b2fb0597ac6490e5b2e3eb1d0a5a6a0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/38dcc41263b1a009e2d7560d81dee9041f4f7941b66cd73b63df402a6fe3c22d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -129,6 +129,30 @@ "data": "MyCanaryThree968B1271" } ], + "/canary-one/MyCanaryFour/ArtifactsBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyCanaryFourArtifactsBucketE259973B" + } + ], + "/canary-one/MyCanaryFour/ArtifactsBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyCanaryFourArtifactsBucketPolicy20BDB9D7" + } + ], + "/canary-one/MyCanaryFour/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyCanaryFourServiceRoleA532F905" + } + ], + "/canary-one/MyCanaryFour/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyCanaryFour15095F40" + } + ], "/canary-one/MyPythonCanary/ArtifactsBucket/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/tree.json b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/tree.json index b3b68479060e3..688b06c0583c7 100644 --- a/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-synthetics/test/canary.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.133" } }, "canary-one": { @@ -431,8 +431,8 @@ "id": "Stage", "path": "canary-one/MyCanaryOne/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -724,8 +724,8 @@ "id": "Stage", "path": "canary-one/MyCanaryTwo/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -1017,8 +1017,8 @@ "id": "Stage", "path": "canary-one/MyCanaryThree/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -1085,6 +1085,299 @@ "version": "0.0.0" } }, + "MyCanaryFour": { + "id": "MyCanaryFour", + "path": "canary-one/MyCanaryFour", + "children": { + "ArtifactsBucket": { + "id": "ArtifactsBucket", + "path": "canary-one/MyCanaryFour/ArtifactsBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/MyCanaryFour/ArtifactsBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "bucketEncryption": { + "serverSideEncryptionConfiguration": [ + { + "serverSideEncryptionByDefault": { + "sseAlgorithm": "aws:kms" + } + } + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "canary-one/MyCanaryFour/ArtifactsBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/MyCanaryFour/ArtifactsBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "MyCanaryFourArtifactsBucketE259973B" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "ServiceRole": { + "id": "ServiceRole", + "path": "canary-one/MyCanaryFour/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/MyCanaryFour/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "policies": [ + { + "policyName": "canaryPolicy", + "policyDocument": { + "Statement": [ + { + "Action": "s3:ListAllMyBuckets", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "s3:GetBucketLocation", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + } + }, + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyCanaryFourArtifactsBucketE259973B", + "Arn" + ] + }, + "/*" + ] + ] + } + }, + { + "Action": "cloudwatch:PutMetricData", + "Condition": { + "StringEquals": { + "cloudwatch:namespace": "CloudWatchSynthetics" + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/lambda/cwsyn-*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Role", + "version": "0.0.0" + } + }, + "Code": { + "id": "Code", + "path": "canary-one/MyCanaryFour/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "canary-one/MyCanaryFour/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "canary-one/MyCanaryFour/Code/AssetBucket", + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3-assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "canary-one/MyCanaryFour/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", + "aws:cdk:cloudformation:props": { + "artifactS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "MyCanaryFourArtifactsBucketE259973B" + } + ] + ] + }, + "code": { + "handler": "canary.handler", + "s3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "s3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + }, + "executionRoleArn": { + "Fn::GetAtt": [ + "MyCanaryFourServiceRoleA532F905", + "Arn" + ] + }, + "name": "assetcanary-four", + "runtimeVersion": "syn-nodejs-puppeteer-3.7", + "schedule": { + "durationInSeconds": "0", + "expression": "rate(5 minutes)" + }, + "startCanaryAfterCreation": true + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-synthetics.CfnCanary", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-synthetics.Canary", + "version": "0.0.0" + } + }, "MyPythonCanary": { "id": "MyPythonCanary", "path": "canary-one/MyPythonCanary", @@ -1310,8 +1603,8 @@ "id": "Stage", "path": "canary-one/MyPythonCanary/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -1380,14 +1673,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics/test/integ.canary.ts b/packages/@aws-cdk/aws-synthetics/test/integ.canary.ts index 268667b8439f3..c4dde679acde3 100644 --- a/packages/@aws-cdk/aws-synthetics/test/integ.canary.ts +++ b/packages/@aws-cdk/aws-synthetics/test/integ.canary.ts @@ -12,6 +12,7 @@ import * as synthetics from '../lib'; * -- aws synthetics get-canary --name assetcanary-one has a state of 'RUNNING' * -- aws synthetics get-canary --name assetcanary-two has a state of 'RUNNING' * -- aws synthetics get-canary --name assetcanary-three has a state of 'RUNNING' + * -- aws synthetics get-canary --name assetcanary-four has a state of 'RUNNING' */ const app = new cdk.App(); const stack = new cdk.Stack(app, 'canary-one'); @@ -60,6 +61,15 @@ new synthetics.Canary(stack, 'MyCanaryThree', { runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_3, }); +new synthetics.Canary(stack, 'MyCanaryFour', { + canaryName: 'assetcanary-four', + test: synthetics.Test.custom({ + handler: 'canary.handler', + code: synthetics.Code.fromAsset(path.join(__dirname, 'canary.zip')), + }), + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_7, +}); + new synthetics.Canary(stack, 'MyPythonCanary', { canaryName: 'py-canary-integ', test: synthetics.Test.custom({