From 1d7a9a80b08d41ce8759bed9286adaa8259c2bc8 Mon Sep 17 00:00:00 2001 From: WinterYukky <49480575+WinterYukky@users.noreply.github.com> Date: Wed, 31 May 2023 06:30:14 +0900 Subject: [PATCH] feat(synthetics): support runtime nodejs puppeteer 4.0 (#25553) ## What change Add CloudWatch Synthetics runtime nodejs puppeteer 4.0. ## Others I changed integ test to using integ-tests assertions. Closes #25493 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-synthetics-alpha/README.md | 12 +- .../aws-synthetics-alpha/lib/runtime.ts | 13 + .../aws-synthetics-alpha/package.json | 1 + .../canaries/nodejs/node_modules/canary.js | 7 +- .../test/canaries/python/canary.py | 5 +- ...efaultTestDeployAssert3AD5A094.assets.json | 32 + ...aultTestDeployAssert3AD5A094.template.json | 1278 ++++++++++ .../index.js | 1296 ++++++++++ .../__entrypoint__.js | 147 ++ .../index.js | 78 + .../nodejs/node_modules/canary.js | 7 +- .../python/canary.py | 5 +- .../canary-one.assets.json | 25 +- .../canary-one.template.json | 789 ++++-- .../test/integ.canary.js.snapshot/cdk.out | 2 +- .../test/integ.canary.js.snapshot/integ.json | 12 +- .../integ.canary.js.snapshot/manifest.json | 484 +++- .../test/integ.canary.js.snapshot/tree.json | 2171 +++++++++++++---- .../aws-synthetics-alpha/test/integ.canary.ts | 126 +- 19 files changed, 5562 insertions(+), 928 deletions(-) create mode 100644 packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets.json create mode 100644 packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.template.json create mode 100644 packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.bundle/index.js create mode 100644 packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/__entrypoint__.js create mode 100644 packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/index.js rename packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/{asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb => asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699}/nodejs/node_modules/canary.js (85%) rename packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/{asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb => asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699}/python/canary.py (95%) diff --git a/packages/@aws-cdk/aws-synthetics-alpha/README.md b/packages/@aws-cdk/aws-synthetics-alpha/README.md index e9e2f6ef974bc..a946fcd03ba10 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/README.md +++ b/packages/@aws-cdk/aws-synthetics-alpha/README.md @@ -36,7 +36,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_9, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, environmentVariables: { stage: 'prod', }, @@ -120,7 +120,7 @@ const canary = new synthetics.Canary(stack, 'Canary', { code: synthetics.Code.fromInline('/* Synthetics handler code'), }), enableAutoDeleteLambdas: true, - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, }); ``` @@ -146,7 +146,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_9, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, }); // To supply the code from your local filesystem: @@ -155,7 +155,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_9, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, }); // To supply the code from a S3 bucket: @@ -166,7 +166,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_9, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, }); ``` @@ -205,7 +205,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_9, + runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, vpc, }); ``` diff --git a/packages/@aws-cdk/aws-synthetics-alpha/lib/runtime.ts b/packages/@aws-cdk/aws-synthetics-alpha/lib/runtime.ts index 2a69ded0881be..be557dc6f36f2 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/lib/runtime.ts +++ b/packages/@aws-cdk/aws-synthetics-alpha/lib/runtime.ts @@ -203,6 +203,19 @@ export class Runtime { */ public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_9 = new Runtime('syn-nodejs-puppeteer-3.9', RuntimeFamily.NODEJS); + /** + * `syn-nodejs-puppeteer-4.0` includes the following: + * - Lambda runtime Node.js 16.x + * - Puppeteer-core version 5.5.0 + * - Chromium version 92.0.4512 + * + * New Features: + * - **Dependency upgrades**: The Node.js dependency is updated to 16.x. + * + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-4.0 + */ + public static readonly SYNTHETICS_NODEJS_PUPPETEER_4_0 = new Runtime('syn-nodejs-puppeteer-4.0', RuntimeFamily.NODEJS); + /** * `syn-python-selenium-1.0` includes the following: * - Lambda runtime Python 3.8 diff --git a/packages/@aws-cdk/aws-synthetics-alpha/package.json b/packages/@aws-cdk/aws-synthetics-alpha/package.json index c48a06f5ba322..189159aa50f9c 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/package.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/package.json @@ -87,6 +87,7 @@ "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", + "@aws-cdk/integ-tests-alpha": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/nodejs/node_modules/canary.js b/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/nodejs/node_modules/canary.js index 0fa437f6288a2..d7936811fd8c1 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/nodejs/node_modules/canary.js +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/nodejs/node_modules/canary.js @@ -10,7 +10,7 @@ const apiCanaryBlueprint = async function () { return new Promise((resolve, reject) => { log.info("Making request with options: " + JSON.stringify(requestOption)); let req - if (requestOption.port === 443) { + if (requestOption.protocol === 'https:') { req = https.request(requestOption); } else { req = http.request(requestOption); @@ -19,7 +19,7 @@ const apiCanaryBlueprint = async function () { log.info(`Status Code: ${res.statusCode}`) log.info(`Response Headers: ${JSON.stringify(res.headers)}`) if (res.statusCode !== 200) { - reject("Failed: " + requestOption.path); + reject("Failed: " + requestOption.pathname); } res.on('data', (d) => { log.info("Response: " + d); @@ -42,12 +42,11 @@ const apiCanaryBlueprint = async function () { const headers = {} headers['User-Agent'] = [synthetics.getCanaryUserAgentString(), headers['User-Agent']].join(' '); - const requestOptions = {"hostname":"ajt66lp5wj.execute-api.us-east-1.amazonaws.com","method":"GET","path":"/prod/","port":443} + const requestOptions = new URL(process.env.URL); requestOptions['headers'] = headers; await verifyRequest(requestOptions); }; - exports.handler = async () => { return await apiCanaryBlueprint(); }; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/python/canary.py b/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/python/canary.py index 2dbed4e312afe..fac8b8004a7a7 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/python/canary.py +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/canaries/python/canary.py @@ -1,5 +1,6 @@ # This example comes from the AWS Synthetics service console "API canary" blueprint +import os import json import http.client import urllib.parse @@ -23,7 +24,7 @@ def verify_request(method, url, post_data=None, headers={}): else: conn = http.client.HTTPConnection(parsed_url.hostname, parsed_url.port) - conn.request(method, url, str(post_data), headers) + conn.request(method, url, post_data, headers) response = conn.getresponse() logger.info("Status Code: %s " % response.status) logger.info("Response Headers: %s" % json.dumps(response.headers.as_string())) @@ -46,7 +47,7 @@ def verify_request(method, url, post_data=None, headers={}): def main(): - url = 'https://example.com/' + url = os.environ['URL'] method = 'GET' postData = "" headers = {} diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets.json new file mode 100644 index 0000000000000..10a64346e436e --- /dev/null +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets.json @@ -0,0 +1,32 @@ +{ + "version": "31.0.0", + "files": { + "36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4": { + "source": { + "path": "asset.36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.bundle", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "0d889e0d833f8b9b09eff9583a832802952f1f7f181507ea7cec6916c2721470": { + "source": { + "path": "IntegCanaryTestDefaultTestDeployAssert3AD5A094.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "0d889e0d833f8b9b09eff9583a832802952f1f7f181507ea7cec6916c2721470.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.template.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.template.json new file mode 100644 index 0000000000000..29ef3ddd5c3b3 --- /dev/null +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/IntegCanaryTestDefaultTestDeployAssert3AD5A094.template.json @@ -0,0 +1,1278 @@ +{ + "Resources": { + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46": { + "Type": "Custom::DeployAssert@SdkCallSyntheticsgetCanaryRuns", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Synthetics", + "api": "getCanaryRuns", + "expected": "{\"$StringLike\":\"PASSED\"}", + "actualPath": "CanaryRuns.0.Status.State", + "stateMachineArn": { + "Ref": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitFor3322FCE2" + }, + "parameters": { + "Name": { + "Fn::ImportValue": "canary-one:ExportsOutputRefInlineAsset5EAEB9B5D9353D4F" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "CanaryRuns.0.Status.State" + ], + "salt": "1684373589973" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForIsCompleteProviderInvoke08378048": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForRole31110FCC", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForTimeoutProviderInvoke721B9141": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForRole31110FCC", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForRole31110FCC": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitFor3322FCE2": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForRole31110FCC", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForRole31110FCC" + ] + }, + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + } + ] + } + } + ] + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.zip" + }, + "Timeout": 120, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "synthetics:GetCanaryRuns" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + } + ] + } + } + ] + } + }, + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.zip" + }, + "Timeout": 120, + "Handler": "index.isComplete", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB", + "Arn" + ] + } + } + }, + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aRoleB84BD8CE": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + } + }, + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.zip" + }, + "Timeout": 120, + "Handler": "index.onTimeout", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aRoleB84BD8CE", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792": { + "Type": "Custom::DeployAssert@SdkCallSyntheticsgetCanaryRuns", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Synthetics", + "api": "getCanaryRuns", + "expected": "{\"$StringLike\":\"PASSED\"}", + "actualPath": "CanaryRuns.0.Status.State", + "stateMachineArn": { + "Ref": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForF1DFDA7C" + }, + "parameters": { + "Name": { + "Fn::ImportValue": "canary-one:ExportsOutputRefDirectoryAssetB49EFE5C6067345C" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "CanaryRuns.0.Status.State" + ], + "salt": "1684373589976" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForIsCompleteProviderInvoke6FE02642": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForRole9BDDAD93", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForTimeoutProviderInvoke4EC1BFB5": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForRole9BDDAD93", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForRole9BDDAD93": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForF1DFDA7C": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForRole9BDDAD93", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForRole9BDDAD93" + ] + }, + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe": { + "Type": "Custom::DeployAssert@SdkCallSyntheticsgetCanaryRuns", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Synthetics", + "api": "getCanaryRuns", + "expected": "{\"$StringLike\":\"PASSED\"}", + "actualPath": "CanaryRuns.0.Status.State", + "stateMachineArn": { + "Ref": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForDB2A9921" + }, + "parameters": { + "Name": { + "Fn::ImportValue": "canary-one:ExportsOutputRefZipAssetA028C65FBA619339" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "CanaryRuns.0.Status.State" + ], + "salt": "1684373589977" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForIsCompleteProviderInvoke676F4DDB": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForRole0C9EEFC1", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForTimeoutProviderInvoke3CC34AEA": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForRole0C9EEFC1", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForRole0C9EEFC1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForDB2A9921": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForRole0C9EEFC1", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForRole0C9EEFC1" + ] + }, + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae": { + "Type": "Custom::DeployAssert@SdkCallSyntheticsgetCanaryRuns", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Synthetics", + "api": "getCanaryRuns", + "expected": "{\"$StringLike\":\"PASSED\"}", + "actualPath": "CanaryRuns.0.Status.State", + "stateMachineArn": { + "Ref": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitFor2AE5B3D5" + }, + "parameters": { + "Name": { + "Fn::ImportValue": "canary-one:ExportsOutputRefSynNodejsPuppeteer3978815E0AC2F26208" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "CanaryRuns.0.Status.State" + ], + "salt": "1684373589978" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForIsCompleteProviderInvokeEFBEE0D2": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForRoleF3F1B67B", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForTimeoutProviderInvoke0A0F7C7B": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForRoleF3F1B67B", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForRoleF3F1B67B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitFor2AE5B3D5": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForRoleF3F1B67B", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForRoleF3F1B67B" + ] + }, + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60": { + "Type": "Custom::DeployAssert@SdkCallSyntheticsgetCanaryRuns", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Synthetics", + "api": "getCanaryRuns", + "expected": "{\"$StringLike\":\"PASSED\"}", + "actualPath": "CanaryRuns.0.Status.State", + "stateMachineArn": { + "Ref": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitFor8805095D" + }, + "parameters": { + "Name": { + "Fn::ImportValue": "canary-one:ExportsOutputRefSynNodejsPuppeteer406C46FFAF8F9722F2" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "CanaryRuns.0.Status.State" + ], + "salt": "1684373589979" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForIsCompleteProviderInvoke28F4AB77": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForRoleACF107E5", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForTimeoutProviderInvoke78F920F8": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForRoleACF107E5", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForRoleACF107E5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitFor8805095D": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForRoleACF107E5", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForRoleACF107E5" + ] + }, + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2": { + "Type": "Custom::DeployAssert@SdkCallSyntheticsgetCanaryRuns", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Synthetics", + "api": "getCanaryRuns", + "expected": "{\"$StringLike\":\"PASSED\"}", + "actualPath": "CanaryRuns.0.Status.State", + "stateMachineArn": { + "Ref": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForB088533D" + }, + "parameters": { + "Name": { + "Fn::ImportValue": "canary-one:ExportsOutputRefSynPythonSelenium13F92D8275979DE724" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "CanaryRuns.0.Status.State" + ], + "salt": "1684373589980" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForIsCompleteProviderInvokeA008B058": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForRole9256B779", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForTimeoutProviderInvoke5934B864": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForRole9256B779", + "Arn" + ] + } + } + }, + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForRole9256B779": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForB088533D": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":60,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForRole9256B779", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForRole9256B779" + ] + } + }, + "Outputs": { + "AssertionResultsAwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46", + "assertion" + ] + } + }, + "AssertionResultsAwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792", + "assertion" + ] + } + }, + "AssertionResultsAwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe", + "assertion" + ] + } + }, + "AssertionResultsAwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae", + "assertion" + ] + } + }, + "AssertionResultsAwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60", + "assertion" + ] + } + }, + "AssertionResultsAwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2", + "assertion" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.bundle/index.js b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.bundle/index.js new file mode 100644 index 0000000000000..6f5404d473d1b --- /dev/null +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.36618132bd37b6b15f9987b57ad1fbf613f1ad937aec72381232b163ed9c44c4.bundle/index.js @@ -0,0 +1,1296 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../aws-cdk-lib/assertions/lib/matcher.ts +var matcher_exports = {}; +__export(matcher_exports, { + MatchResult: () => MatchResult, + Matcher: () => Matcher +}); +function* range(n) { + for (let i = 0; i < n; i++) { + yield i; + } +} +function* enumFirst(xs) { + let first = true; + for (const x of xs) { + yield [first, x]; + first = false; + } +} +var Matcher, MatchResult; +var init_matcher = __esm({ + "../../aws-cdk-lib/assertions/lib/matcher.ts"() { + "use strict"; + Matcher = class { + /** + * Check whether the provided object is a subtype of the `IMatcher`. + */ + static isMatcher(x) { + return x && x instanceof Matcher; + } + }; + MatchResult = class { + constructor(target) { + this.failuresHere = /* @__PURE__ */ new Map(); + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.innerMatchFailures = /* @__PURE__ */ new Map(); + this._hasFailed = false; + this._failCount = 0; + this._cost = 0; + this.target = target; + } + /** + * DEPRECATED + * @deprecated use recordFailure() + */ + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + /** + * Record a new failure into this result at a specific path. + */ + recordFailure(failure) { + const failKey = failure.path.join("."); + let list = this.failuresHere.get(failKey); + if (!list) { + list = []; + this.failuresHere.set(failKey, list); + } + this._failCount += 1; + this._cost += failure.cost ?? 1; + list.push(failure); + this._hasFailed = true; + return this; + } + /** Whether the match is a success */ + get isSuccess() { + return !this._hasFailed; + } + /** Does the result contain any failures. If not, the result is a success */ + hasFailed() { + return this._hasFailed; + } + /** The number of failures */ + get failCount() { + return this._failCount; + } + /** The cost of the failures so far */ + get failCost() { + return this._cost; + } + /** + * Compose the results of a previous match as a subtree. + * @param id the id of the parent tree. + */ + compose(id, inner) { + if (inner.hasFailed()) { + this._hasFailed = true; + this._failCount += inner.failCount; + this._cost += inner._cost; + this.innerMatchFailures.set(id, inner); + } + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + /** + * Prepare the result to be analyzed. + * This API *must* be called prior to analyzing these results. + */ + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + /** + * Render the failed match in a presentable way + * + * Prefer using `renderMismatch` over this method. It is left for backwards + * compatibility for test suites that expect it, but `renderMismatch()` will + * produce better output. + */ + toHumanStrings() { + const failures = new Array(); + debugger; + recurse(this, []); + return failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at /${r.path.join("/")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + function recurse(x, prefix) { + for (const fail of Array.from(x.failuresHere.values()).flat()) { + failures.push({ + matcher: fail.matcher, + message: fail.message, + path: [...prefix, ...fail.path] + }); + } + for (const [key, inner] of x.innerMatchFailures.entries()) { + recurse(inner, [...prefix, key]); + } + } + } + /** + * Do a deep render of the match result, showing the structure mismatches in context + */ + renderMismatch() { + if (!this.hasFailed()) { + return ""; + } + const parts = new Array(); + const indents = new Array(); + emitFailures(this, ""); + recurse(this); + return moveMarkersToFront(parts.join("").trimEnd()); + function emit(x) { + if (x === void 0) { + debugger; + } + parts.push(x.replace(/\n/g, ` +${indents.join("")}`)); + } + function emitFailures(r, path, scrapSet) { + for (const fail of r.failuresHere.get(path) ?? []) { + emit(`!! ${fail.message} +`); + } + scrapSet == null ? void 0 : scrapSet.delete(path); + } + function recurse(r) { + const remainingFailures = new Set(Array.from(r.failuresHere.keys()).filter((x) => x !== "")); + if (Array.isArray(r.target)) { + indents.push(" "); + emit("[\n"); + for (const [first, i] of enumFirst(range(r.target.length))) { + if (!first) { + emit(",\n"); + } + emitFailures(r, `${i}`, remainingFailures); + const innerMatcher = r.innerMatchFailures.get(`${i}`); + if (innerMatcher) { + emitFailures(innerMatcher, ""); + recurseComparingValues(innerMatcher, r.target[i]); + } else { + emit(renderAbridged(r.target[i])); + } + } + emitRemaining(); + indents.pop(); + emit("\n]"); + return; + } + if (r.target && typeof r.target === "object") { + indents.push(" "); + emit("{\n"); + const keys = Array.from(/* @__PURE__ */ new Set([ + ...Object.keys(r.target), + ...Array.from(remainingFailures) + ])).sort(); + for (const [first, key] of enumFirst(keys)) { + if (!first) { + emit(",\n"); + } + emitFailures(r, key, remainingFailures); + const innerMatcher = r.innerMatchFailures.get(key); + if (innerMatcher) { + emitFailures(innerMatcher, ""); + emit(`${jsonify(key)}: `); + recurseComparingValues(innerMatcher, r.target[key]); + } else { + emit(`${jsonify(key)}: `); + emit(renderAbridged(r.target[key])); + } + } + emitRemaining(); + indents.pop(); + emit("\n}"); + return; + } + emitRemaining(); + emit(jsonify(r.target)); + function emitRemaining() { + if (remainingFailures.size > 0) { + emit("\n"); + } + for (const key of remainingFailures) { + emitFailures(r, key); + } + } + } + function recurseComparingValues(inner, actualValue) { + if (inner.target === actualValue) { + return recurse(inner); + } + emit(renderAbridged(actualValue)); + emit(" <*> "); + recurse(inner); + } + function renderAbridged(x) { + if (Array.isArray(x)) { + switch (x.length) { + case 0: + return "[]"; + case 1: + return `[ ${renderAbridged(x[0])} ]`; + case 2: + if (x.every((e) => ["number", "boolean", "string"].includes(typeof e))) { + return `[ ${x.map(renderAbridged).join(", ")} ]`; + } + return "[ ... ]"; + default: + return "[ ... ]"; + } + } + if (x && typeof x === "object") { + const keys = Object.keys(x); + switch (keys.length) { + case 0: + return "{}"; + case 1: + return `{ ${JSON.stringify(keys[0])}: ${renderAbridged(x[keys[0]])} }`; + default: + return "{ ... }"; + } + } + return jsonify(x); + } + function jsonify(x) { + return JSON.stringify(x) ?? "undefined"; + } + function moveMarkersToFront(x) { + const re = /^(\s+)!!/gm; + return x.replace(re, (_, spaces) => `!!${spaces.substring(0, spaces.length - 2)}`); + } + } + /** + * Record a capture against in this match result. + */ + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } + }; + } +}); + +// ../../aws-cdk-lib/assertions/lib/private/matchers/absent.ts +var AbsentMatch; +var init_absent = __esm({ + "../../aws-cdk-lib/assertions/lib/private/matchers/absent.ts"() { + "use strict"; + init_matcher(); + AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } + }; + } +}); + +// ../../aws-cdk-lib/assertions/lib/private/sorting.ts +function sortKeyComparator(keyFn) { + return (a, b) => { + const ak = keyFn(a); + const bk = keyFn(b); + for (let i = 0; i < ak.length && i < bk.length; i++) { + const av = ak[i]; + const bv = bk[i]; + let diff = 0; + if (typeof av === "number" && typeof bv === "number") { + diff = av - bv; + } else if (typeof av === "string" && typeof bv === "string") { + diff = av.localeCompare(bv); + } + if (diff !== 0) { + return diff; + } + } + return bk.length - ak.length; + }; +} +var init_sorting = __esm({ + "../../aws-cdk-lib/assertions/lib/private/sorting.ts"() { + "use strict"; + } +}); + +// ../../aws-cdk-lib/assertions/lib/private/sparse-matrix.ts +var SparseMatrix; +var init_sparse_matrix = __esm({ + "../../aws-cdk-lib/assertions/lib/private/sparse-matrix.ts"() { + "use strict"; + SparseMatrix = class { + constructor() { + this.matrix = /* @__PURE__ */ new Map(); + } + get(row, col) { + var _a; + return (_a = this.matrix.get(row)) == null ? void 0 : _a.get(col); + } + row(row) { + var _a; + return Array.from(((_a = this.matrix.get(row)) == null ? void 0 : _a.entries()) ?? []); + } + set(row, col, value) { + let r = this.matrix.get(row); + if (!r) { + r = /* @__PURE__ */ new Map(); + this.matrix.set(row, r); + } + r.set(col, value); + } + }; + } +}); + +// ../../aws-cdk-lib/assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} +var init_type = __esm({ + "../../aws-cdk-lib/assertions/lib/private/type.ts"() { + "use strict"; + } +}); + +// ../../aws-cdk-lib/assertions/lib/match.ts +var match_exports = {}; +__export(match_exports, { + Match: () => Match +}); +var Match, LiteralMatch, ArrayMatch, ObjectMatch, SerializedJson, NotMatch, AnyMatch, StringLikeRegexpMatch; +var init_match = __esm({ + "../../aws-cdk-lib/assertions/lib/match.ts"() { + "use strict"; + init_matcher(); + init_absent(); + init_sorting(); + init_sparse_matrix(); + init_type(); + Match = class { + /** + * Use this matcher in the place of a field's value, if the field must not be present. + */ + static absent() { + return new AbsentMatch("absent"); + } + /** + * Matches the specified pattern with the array found in the same relative path of the target. + * The set of elements (or matchers) must be in the same order as would be found. + * @param pattern the pattern to match + */ + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + /** + * Matches the specified pattern with the array found in the same relative path of the target. + * The set of elements (or matchers) must match exactly and in order. + * @param pattern the pattern to match + */ + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + /** + * Deep exact matching of the specified pattern to the target. + * @param pattern the pattern to match + */ + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + /** + * Matches the specified pattern to an object found in the same relative path of the target. + * The keys and their values (or matchers) must be present in the target but the target can be a superset. + * @param pattern the pattern to match + */ + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + /** + * Matches the specified pattern to an object found in the same relative path of the target. + * The keys and their values (or matchers) must match exactly with the target. + * @param pattern the pattern to match + */ + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + /** + * Matches any target which does NOT follow the specified pattern. + * @param pattern the pattern to NOT match + */ + static not(pattern) { + return new NotMatch("not", pattern); + } + /** + * Matches any string-encoded JSON and applies the specified pattern after parsing it. + * @param pattern the pattern to match after parsing the encoded JSON. + */ + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + /** + * Matches any non-null value at the target. + */ + static anyValue() { + return new AnyMatch("anyValue"); + } + /** + * Matches targets according to a regular expression + */ + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } + }; + LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } + }; + ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + return this.subsequence ? this.testSubsequence(actual) : this.testFullArray(actual); + } + testFullArray(actual) { + const result = new MatchResult(actual); + let i = 0; + for (; i < this.pattern.length && i < actual.length; i++) { + const patternElement = this.pattern[i]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const innerResult = matcher.test(actual[i]); + result.compose(`${i}`, innerResult); + } + if (i < this.pattern.length) { + result.recordFailure({ + matcher: this, + message: `Not enough elements in array (expecting ${this.pattern.length}, got ${actual.length})`, + path: [`${i}`] + }); + } + if (i < actual.length) { + result.recordFailure({ + matcher: this, + message: `Too many elements in array (expecting ${this.pattern.length}, got ${actual.length})`, + path: [`${i}`] + }); + } + return result; + } + testSubsequence(actual) { + const result = new MatchResult(actual); + let patternIdx = 0; + let actualIdx = 0; + const matches = new SparseMatrix(); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (matcherName == "absent" || matcherName == "anyValue") { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + matches.set(patternIdx, actualIdx, innerResult); + actualIdx++; + if (innerResult.isSuccess) { + result.compose(`${actualIdx}`, innerResult); + patternIdx++; + } + } + if (patternIdx < this.pattern.length) { + for (let spi = 0; spi < patternIdx; spi++) { + const foundMatch = matches.row(spi).find(([, r]) => r.isSuccess); + if (!foundMatch) { + continue; + } + const [index] = foundMatch; + result.compose(`${index}`, new MatchResult(actual[index]).recordFailure({ + matcher: this, + message: `arrayWith pattern ${spi} matched here`, + path: [], + cost: 0 + // This is an informational message so it would be unfair to assign it cost + })); + } + const failedMatches = matches.row(patternIdx); + failedMatches.sort(sortKeyComparator(([i, r]) => [r.failCost, i])); + if (failedMatches.length > 0) { + const [index, innerResult] = failedMatches[0]; + result.recordFailure({ + matcher: this, + message: `Could not match arrayWith pattern ${patternIdx}. This is the closest match`, + path: [`${index}`], + cost: 0 + // Informational message + }); + result.compose(`${index}`, innerResult); + } else { + result.recordFailure({ + matcher: this, + message: `Could not match arrayWith pattern ${patternIdx}. No more elements to try`, + path: [`${actual.length}`] + }); + } + } + return result; + } + }; + ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [a], + message: `Unexpected key ${a}` + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [patternKey], + message: `Missing key '${patternKey}'` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(patternKey, inner); + } + return result; + } + }; + SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + if (getType(actual) !== "string") { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + if (innerResult.hasFailed()) { + innerResult.recordFailure({ + matcher: this, + path: [], + message: "Encoded JSON value does not match" + }); + } + return innerResult; + } + }; + NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } + }; + AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } + }; + StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } + }; + } +}); + +// ../../aws-cdk-lib/assertions/lib/helpers-internal/index.js +var require_helpers_internal = __commonJS({ + "../../aws-cdk-lib/assertions/lib/helpers-internal/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports && exports.__exportStar || function(m, exports2) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) + __createBinding(exports2, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + __exportStar((init_match(), __toCommonJS(match_exports)), exports); + __exportStar((init_matcher(), __toCommonJS(matcher_exports)), exports); + } +}); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler, + isComplete: () => isComplete, + onTimeout: () => onTimeout +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// lib/assertions/providers/lambda-handler/assertion.ts +var import_helpers_internal = __toESM(require_helpers_internal()); + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var AWS = __toESM(require("aws-sdk")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + /** + * Handles executing the custom resource event. If `stateMachineArn` is present + * in the props then trigger the waiter statemachine + */ + async handle() { + try { + if ("stateMachineArn" in this.event.ResourceProperties) { + const req = { + stateMachineArn: this.event.ResourceProperties.stateMachineArn, + name: this.event.RequestId, + input: JSON.stringify(this.event) + }; + await this.startExecution(req); + return; + } else { + const response = await this.processEvent(this.event.ResourceProperties); + return response; + } + } catch (e) { + console.log(e); + throw e; + } finally { + clearTimeout(this.timeout); + } + } + /** + * Handle async requests from the waiter state machine + */ + async handleIsComplete() { + try { + const result = await this.processEvent(this.event.ResourceProperties); + return result; + } catch (e) { + console.log(e); + return; + } finally { + clearTimeout(this.timeout); + } + } + /** + * Start a step function state machine which will wait for the request + * to be successful. + */ + async startExecution(req) { + try { + const sfn = new AWS.StepFunctions(); + await sfn.startExecution(req).promise(); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { + "content-type": "", + "content-length": Buffer.byteLength(responseBody, "utf8") + } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } finally { + clearTimeout(this.timeout); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + failed: true, + assertion: JSON.stringify({ + status: "fail", + message: matchResult.renderMismatch() + }) + }; + if (request2.failDeployment) { + throw new Error(result.assertion); + } + } else { + result = { + assertion: JSON.stringify({ + status: "success" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + /** + * Return a Matcher that can be tested against the actual results. + * This will convert the encoded matchers into their corresponding + * assertions matcher. + * + * For example: + * + * ExpectedResult.objectLike({ + * Messages: [{ + * Body: Match.objectLike({ + * Elements: Match.arrayWith([{ Asdf: 3 }]), + * Payload: Match.serializedJson({ key: 'value' }), + * }), + * }], + * }); + * + * Will be encoded as: + * { + * $ObjectLike: { + * Messages: [{ + * Body: { + * $ObjectLike: { + * Elements: { + * $ArrayWith: [{ Asdf: 3 }], + * }, + * Payload: { + * $SerializedJson: { key: 'value' } + * } + * }, + * }, + * }], + * }, + * } + * + * Which can then be parsed by this function. For each key (recursively) + * the parser will check if the value has one of the encoded matchers as a key + * and if so, it will set the value as the Matcher. So, + * + * { + * Body: { + * $ObjectLike: { + * Elements: { + * $ArrayWith: [{ Asdf: 3 }], + * }, + * Payload: { + * $SerializedJson: { key: 'value' } + * } + * }, + * }, + * } + * + * Will be converted to + * { + * Body: Match.objectLike({ + * Elements: Match.arrayWith([{ Asdf: 3 }]), + * Payload: Match.serializedJson({ key: 'value' }), + * }), + * } + */ + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return import_helpers_internal.Match.arrayWith(v[nested]); + case "$ObjectLike": + return import_helpers_internal.Match.objectLike(v[nested]); + case "$StringLike": + return import_helpers_internal.Match.stringLikeRegexp(v[nested]); + case "$SerializedJson": + return import_helpers_internal.Match.serializedJson(v[nested]); + default: + return v; + } + }); + if (import_helpers_internal.Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return import_helpers_internal.Match.exact(final.matcher); + } catch { + return import_helpers_internal.Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign( + {}, + ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + let childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + if (typeof childKey === "string") { + childKey = isJsonString(childKey); + } + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object) + ); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS2 = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS2.VERSION}`); + if (!Object.prototype.hasOwnProperty.call(AWS2, request2.service)) { + throw Error(`Service ${request2.service} does not exist in AWS SDK version ${AWS2.VERSION}.`); + } + const service = new AWS2[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = { + ...flatten(respond) + }; + let resp = respond; + if (request2.outputPaths) { + resp = filterKeys(flatData, request2.outputPaths); + } else if (request2.flattenResponse === "true") { + resp = flatData; + } + console.log(`Returning result ${JSON.stringify(resp)}`); + return resp; + } +}; +function filterKeys(object, searchStrings) { + return Object.entries(object).reduce((filteredObject, [key, value]) => { + for (const searchString of searchStrings) { + if (key.startsWith(`apiCallResponse.${searchString}`)) { + filteredObject[key] = value; + } + } + return filteredObject; + }, {}); +} +function isJsonString(value) { + try { + return JSON.parse(value); + } catch { + return value; + } +} + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`); + const provider = createResourceHandler(event, context); + try { + if (event.RequestType === "Delete") { + await provider.respond({ + status: "SUCCESS", + reason: "OK" + }); + return; + } + const result = await provider.handle(); + if ("stateMachineArn" in event.ResourceProperties) { + console.info('Found "stateMachineArn", waiter statemachine started'); + return; + } else if ("expected" in event.ResourceProperties) { + console.info('Found "expected", testing assertions'); + const actualPath = event.ResourceProperties.actualPath; + const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse; + const assertion = new AssertionHandler({ + ...event, + ResourceProperties: { + ServiceToken: event.ServiceToken, + actual, + expected: event.ResourceProperties.expected + } + }, context); + try { + const assertionResult = await assertion.handle(); + await provider.respond({ + status: "SUCCESS", + reason: "OK", + // return both the result of the API call _and_ the assertion results + data: { + ...assertionResult, + ...result + } + }); + return; + } catch (e) { + await provider.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + return; + } + } + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: result + }); + } catch (e) { + await provider.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + return; + } + return; +} +async function onTimeout(timeoutEvent) { + const isCompleteRequest = JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage); + const provider = createResourceHandler(isCompleteRequest, standardContext); + await provider.respond({ + status: "FAILED", + reason: "Operation timed out: " + JSON.stringify(isCompleteRequest) + }); +} +async function isComplete(event, context) { + console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`); + const provider = createResourceHandler(event, context); + try { + const result = await provider.handleIsComplete(); + const actualPath = event.ResourceProperties.actualPath; + if (result) { + const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse; + if ("expected" in event.ResourceProperties) { + const assertion = new AssertionHandler({ + ...event, + ResourceProperties: { + ServiceToken: event.ServiceToken, + actual, + expected: event.ResourceProperties.expected + } + }, context); + const assertionResult = await assertion.handleIsComplete(); + if (!(assertionResult == null ? void 0 : assertionResult.failed)) { + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: { + ...assertionResult, + ...result + } + }); + return; + } else { + console.log(`Assertion Failed: ${JSON.stringify(assertionResult)}`); + throw new Error(JSON.stringify(event)); + } + } + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: result + }); + } else { + console.log("No result"); + throw new Error(JSON.stringify(event)); + } + return; + } catch (e) { + console.log(e); + throw new Error(JSON.stringify(event)); + } +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } else if (event.ResourceType.startsWith(ASSERT_RESOURCE_TYPE)) { + return new AssertionHandler(event, context); + } else { + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +var standardContext = { + getRemainingTimeInMillis: () => 9e4 +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler, + isComplete, + onTimeout +}); diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/__entrypoint__.js b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/__entrypoint__.js new file mode 100644 index 0000000000000..c83ecebaaadac --- /dev/null +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/__entrypoint__.js @@ -0,0 +1,147 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withRetries = exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': Buffer.byteLength(responseBody, 'utf8'), + }, + }; + const retryOptions = { + attempts: 5, + sleep: 1000, + }; + await withRetries(retryOptions, exports.external.sendHttpRequest)(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLF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sZWVwKG1zOiBudW1iZXIpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChvaykgPT4gc2V0VGltZW91dChvaywgbXMpKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/index.js b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/index.js new file mode 100644 index 0000000000000..bf260b9069cd1 --- /dev/null +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9/index.js @@ -0,0 +1,78 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +// eslint-disable-next-line import/no-extraneous-dependencies +const aws_sdk_1 = require("aws-sdk"); +const AUTO_DELETE_OBJECTS_TAG = 'aws-cdk:auto-delete-objects'; +const s3 = new aws_sdk_1.S3(); +async function handler(event) { + switch (event.RequestType) { + case 'Create': + return; + case 'Update': + return onUpdate(event); + case 'Delete': + return onDelete(event.ResourceProperties?.BucketName); + } +} +exports.handler = handler; +async function onUpdate(event) { + const updateEvent = event; + const oldBucketName = updateEvent.OldResourceProperties?.BucketName; + const newBucketName = updateEvent.ResourceProperties?.BucketName; + const bucketNameHasChanged = newBucketName != null && oldBucketName != null && newBucketName !== oldBucketName; + /* If the name of the bucket has changed, CloudFormation will try to delete the bucket + and create a new one with the new name. So we have to delete the contents of the + bucket so that this operation does not fail. */ + if (bucketNameHasChanged) { + return onDelete(oldBucketName); + } +} +/** + * Recursively delete all items in the bucket + * + * @param bucketName the bucket name + */ +async function emptyBucket(bucketName) { + const listedObjects = await s3.listObjectVersions({ Bucket: bucketName }).promise(); + const contents = [...listedObjects.Versions ?? [], ...listedObjects.DeleteMarkers ?? []]; + if (contents.length === 0) { + return; + } + const records = contents.map((record) => ({ Key: record.Key, VersionId: record.VersionId })); + await s3.deleteObjects({ Bucket: bucketName, Delete: { Objects: records } }).promise(); + if (listedObjects?.IsTruncated) { + await emptyBucket(bucketName); + } +} +async function onDelete(bucketName) { + if (!bucketName) { + throw new Error('No BucketName was provided.'); + } + if (!await isBucketTaggedForDeletion(bucketName)) { + process.stdout.write(`Bucket does not have '${AUTO_DELETE_OBJECTS_TAG}' tag, skipping cleaning.\n`); + return; + } + try { + await emptyBucket(bucketName); + } + catch (e) { + if (e.code !== 'NoSuchBucket') { + throw e; + } + // Bucket doesn't exist. Ignoring + } +} +/** + * The bucket will only be tagged for deletion if it's being deleted in the same + * deployment as this Custom Resource. + * + * If the Custom Resource is every deleted before the bucket, it must be because + * `autoDeleteObjects` has been switched to false, in which case the tag would have + * been removed before we get to this Delete event. + */ +async function isBucketTaggedForDeletion(bucketName) { + const response = await s3.getBucketTagging({ Bucket: bucketName }).promise(); + return response.TagSet.some(tag => tag.Key === AUTO_DELETE_OBJECTS_TAG && tag.Value === 'true'); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQ7QUFDN0QscUNBQTZCO0FBRTdCLE1BQU0sdUJBQXVCLEdBQUcsNkJBQTZCLENBQUM7QUFFOUQsTUFBTSxFQUFFLEdBQUcsSUFBSSxZQUFFLEVBQUUsQ0FBQztBQUViLEtBQUssVUFBVSxPQUFPLENBQUMsS0FBa0Q7SUFDOUUsUUFBUSxLQUFLLENBQUMsV0FBVyxFQUFFO1FBQ3pCLEtBQUssUUFBUTtZQUNYLE9BQU87UUFDVCxLQUFLLFFBQVE7WUFDWCxPQUFPLFFBQVEs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gJ3RydWUnKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb/nodejs/node_modules/canary.js b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699/nodejs/node_modules/canary.js similarity index 85% rename from packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb/nodejs/node_modules/canary.js rename to packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699/nodejs/node_modules/canary.js index 0fa437f6288a2..d7936811fd8c1 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb/nodejs/node_modules/canary.js +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699/nodejs/node_modules/canary.js @@ -10,7 +10,7 @@ const apiCanaryBlueprint = async function () { return new Promise((resolve, reject) => { log.info("Making request with options: " + JSON.stringify(requestOption)); let req - if (requestOption.port === 443) { + if (requestOption.protocol === 'https:') { req = https.request(requestOption); } else { req = http.request(requestOption); @@ -19,7 +19,7 @@ const apiCanaryBlueprint = async function () { log.info(`Status Code: ${res.statusCode}`) log.info(`Response Headers: ${JSON.stringify(res.headers)}`) if (res.statusCode !== 200) { - reject("Failed: " + requestOption.path); + reject("Failed: " + requestOption.pathname); } res.on('data', (d) => { log.info("Response: " + d); @@ -42,12 +42,11 @@ const apiCanaryBlueprint = async function () { const headers = {} headers['User-Agent'] = [synthetics.getCanaryUserAgentString(), headers['User-Agent']].join(' '); - const requestOptions = {"hostname":"ajt66lp5wj.execute-api.us-east-1.amazonaws.com","method":"GET","path":"/prod/","port":443} + const requestOptions = new URL(process.env.URL); requestOptions['headers'] = headers; await verifyRequest(requestOptions); }; - exports.handler = async () => { return await apiCanaryBlueprint(); }; \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb/python/canary.py b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699/python/canary.py similarity index 95% rename from packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb/python/canary.py rename to packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699/python/canary.py index 2dbed4e312afe..fac8b8004a7a7 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb/python/canary.py +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699/python/canary.py @@ -1,5 +1,6 @@ # This example comes from the AWS Synthetics service console "API canary" blueprint +import os import json import http.client import urllib.parse @@ -23,7 +24,7 @@ def verify_request(method, url, post_data=None, headers={}): else: conn = http.client.HTTPConnection(parsed_url.hostname, parsed_url.port) - conn.request(method, url, str(post_data), headers) + conn.request(method, url, post_data, headers) response = conn.getresponse() logger.info("Status Code: %s " % response.status) logger.info("Response Headers: %s" % json.dumps(response.headers.as_string())) @@ -46,7 +47,7 @@ def verify_request(method, url, post_data=None, headers={}): def main(): - url = 'https://example.com/' + url = os.environ['URL'] method = 'GET' postData = "" headers = {} diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.assets.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.assets.json index 644bfda946bca..42625db924aa3 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.assets.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.assets.json @@ -1,15 +1,28 @@ { - "version": "29.0.0", + "version": "31.0.0", "files": { - "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb": { + "40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9": { "source": { - "path": "asset.9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb", + "path": "asset.40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb.zip", + "objectKey": "40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699": { + "source": { + "path": "asset.c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +40,7 @@ } } }, - "4c74166545778fe2f895f948e7d6aec9c5427ffedc8ba02dcb70d5c2ea975967": { + "4c709965b3969e2b12617e4e0b3c4c552609571cb59f716078510e31e5c89437": { "source": { "path": "canary-one.template.json", "packaging": "file" @@ -35,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4c74166545778fe2f895f948e7d6aec9c5427ffedc8ba02dcb70d5c2ea975967.json", + "objectKey": "4c709965b3969e2b12617e4e0b3c4c552609571cb59f716078510e31e5c89437.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-alpha/test/integ.canary.js.snapshot/canary-one.template.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.template.json index c60ef66441eeb..c7f7824cb706e 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.template.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/canary-one.template.json @@ -1,181 +1,45 @@ { "Resources": { - "mytestbucket8DC16178": { + "MyTestBucket81062429": { "Type": "AWS::S3::Bucket", - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyCanaryServiceRole593F9DD9": { - "Type": "AWS::IAM::Role", "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "Policies": [ + "Tags": [ { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "mytestbucket8DC16178", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "mytestbucket8DC16178", - "Arn" - ] - }, - "/integ/*" - ] - ] - } - }, - { - "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" + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" } ] - } - }, - "MyCanary1A94CAFA": { - "Type": "AWS::Synthetics::Canary", - "Properties": { - "ArtifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "mytestbucket8DC16178" - }, - "/integ" - ] - ] - }, - "Code": { - "Handler": "index.handler", - "Script": "\n exports.handler = async () => {\n console.log('hello world');\n };" - }, - "ExecutionRoleArn": { - "Fn::GetAtt": [ - "MyCanaryServiceRole593F9DD9", - "Arn" - ] - }, - "Name": "canary-integ", - "RuntimeVersion": "syn-nodejs-puppeteer-3.9", - "Schedule": { - "DurationInSeconds": "0", - "Expression": "rate(1 minute)" - }, - "StartCanaryAfterCreation": true - } - }, - "MyCanaryOneArtifactsBucketDF4A487D": { - "Type": "AWS::S3::Bucket", - "Properties": { - "BucketEncryption": { - "ServerSideEncryptionConfiguration": [ - { - "ServerSideEncryptionByDefault": { - "SSEAlgorithm": "aws:kms" - } - } - ] - } }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, - "MyCanaryOneArtifactsBucketPolicyA2B99545": { + "MyTestBucketPolicyE11AF29F": { "Type": "AWS::S3::BucketPolicy", "Properties": { "Bucket": { - "Ref": "MyCanaryOneArtifactsBucketDF4A487D" + "Ref": "MyTestBucket81062429" }, "PolicyDocument": { "Statement": [ { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", "Principal": { - "AWS": "*" + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } }, "Resource": [ { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "MyTestBucket81062429", "Arn" ] }, @@ -185,7 +49,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "MyTestBucket81062429", "Arn" ] }, @@ -200,7 +64,147 @@ } } }, - "MyCanaryOneServiceRole41995561": { + "MyTestBucketAutoDeleteObjectsCustomResource1E1AC890": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "MyTestBucket81062429" + } + }, + "DependsOn": [ + "MyTestBucketPolicyE11AF29F" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs16.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "MyTestBucket81062429" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ] + }, + "ApiGateway11E7F47B": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "Name": "ApiGateway" + } + }, + "ApiGatewayDeploymentA26796E849bfdafc1a375345a13992f6e2987daf": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "RestApiId": { + "Ref": "ApiGateway11E7F47B" + }, + "Description": "Automatically created by the RestApi construct" + }, + "DependsOn": [ + "ApiGatewayGET25EBFEA3" + ] + }, + "ApiGatewayDeploymentStageprod1C6D5CD6": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "RestApiId": { + "Ref": "ApiGateway11E7F47B" + }, + "DeploymentId": { + "Ref": "ApiGatewayDeploymentA26796E849bfdafc1a375345a13992f6e2987daf" + }, + "StageName": "prod" + } + }, + "ApiGatewayGET25EBFEA3": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "HttpMethod": "GET", + "ResourceId": { + "Fn::GetAtt": [ + "ApiGateway11E7F47B", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "ApiGateway11E7F47B" + }, + "AuthorizationType": "NONE", + "Integration": { + "IntegrationResponses": [ + { + "StatusCode": "200" + } + ], + "PassthroughBehavior": "NEVER", + "RequestTemplates": { + "application/json": "{ \"statusCode\": 200 }" + }, + "Type": "MOCK" + }, + "MethodResponses": [ + { + "StatusCode": "200" + } + ] + } + }, + "InlineAssetServiceRole90EB5484": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -229,7 +233,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "MyTestBucket81062429", "Arn" ] } @@ -243,11 +247,11 @@ [ { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "MyTestBucket81062429", "Arn" ] }, - "/*" + "/integ/*" ] ] } @@ -298,7 +302,7 @@ ] } }, - "MyCanaryOneEF6A9CB9": { + "InlineAsset5EAEB9B5": { "Type": "AWS::Synthetics::Canary", "Properties": { "ArtifactS3Location": { @@ -307,35 +311,32 @@ [ "s3://", { - "Ref": "MyCanaryOneArtifactsBucketDF4A487D" - } + "Ref": "MyTestBucket81062429" + }, + "/integ" ] ] }, "Code": { - "Handler": "canary.handler", - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb.zip" + "Handler": "index.handler", + "Script": "\n exports.handler = async () => {\n console.log('hello world');\n };" }, "ExecutionRoleArn": { "Fn::GetAtt": [ - "MyCanaryOneServiceRole41995561", + "InlineAssetServiceRole90EB5484", "Arn" ] }, - "Name": "assetcanary-one", - "RuntimeVersion": "syn-nodejs-puppeteer-3.9", + "Name": "canaryoneinline66eeb2", + "RuntimeVersion": "syn-nodejs-puppeteer-4.0", "Schedule": { "DurationInSeconds": "0", - "Expression": "rate(5 minutes)" + "Expression": "rate(1 minute)" }, - "StartCanaryAfterCreation": true, - "DeleteLambdaResourcesOnCanaryDeletion": true + "StartCanaryAfterCreation": true } }, - "MyCanaryTwoArtifactsBucket79B179B6": { + "DirectoryAssetArtifactsBucketA79AFD6C": { "Type": "AWS::S3::Bucket", "Properties": { "BucketEncryption": { @@ -351,11 +352,11 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyCanaryTwoArtifactsBucketPolicy4719E279": { + "DirectoryAssetArtifactsBucketPolicy6F51B03A": { "Type": "AWS::S3::BucketPolicy", "Properties": { "Bucket": { - "Ref": "MyCanaryTwoArtifactsBucket79B179B6" + "Ref": "DirectoryAssetArtifactsBucketA79AFD6C" }, "PolicyDocument": { "Statement": [ @@ -373,7 +374,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] }, @@ -383,7 +384,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] }, @@ -398,7 +399,7 @@ } } }, - "MyCanaryTwoServiceRole041E85D4": { + "DirectoryAssetServiceRole6C204C16": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -427,7 +428,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] } @@ -441,7 +442,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] }, @@ -496,7 +497,7 @@ ] } }, - "MyCanaryTwo6501D55F": { + "DirectoryAssetB49EFE5C": { "Type": "AWS::Synthetics::Canary", "Properties": { "ArtifactS3Location": { @@ -505,7 +506,7 @@ [ "s3://", { - "Ref": "MyCanaryTwoArtifactsBucket79B179B6" + "Ref": "DirectoryAssetArtifactsBucketA79AFD6C" } ] ] @@ -515,24 +516,53 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + "S3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "ExecutionRoleArn": { "Fn::GetAtt": [ - "MyCanaryTwoServiceRole041E85D4", + "DirectoryAssetServiceRole6C204C16", "Arn" ] }, - "Name": "assetcanary-two", - "RuntimeVersion": "syn-nodejs-puppeteer-3.9", + "Name": "canaryonedirect63ce4e", + "RuntimeVersion": "syn-nodejs-puppeteer-4.0", "Schedule": { "DurationInSeconds": "0", "Expression": "rate(5 minutes)" }, - "StartCanaryAfterCreation": true + "StartCanaryAfterCreation": true, + "DeleteLambdaResourcesOnCanaryDeletion": true, + "RunConfig": { + "EnvironmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, - "MyCanaryThreeArtifactsBucket894E857E": { + "ZipAssetArtifactsBucket8D4ED76C": { "Type": "AWS::S3::Bucket", "Properties": { "BucketEncryption": { @@ -548,11 +578,11 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyCanaryThreeArtifactsBucketPolicy568A97F7": { + "ZipAssetArtifactsBucketPolicy14B38CC6": { "Type": "AWS::S3::BucketPolicy", "Properties": { "Bucket": { - "Ref": "MyCanaryThreeArtifactsBucket894E857E" + "Ref": "ZipAssetArtifactsBucket8D4ED76C" }, "PolicyDocument": { "Statement": [ @@ -570,7 +600,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] }, @@ -580,7 +610,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] }, @@ -595,7 +625,7 @@ } } }, - "MyCanaryThreeServiceRole68117E65": { + "ZipAssetServiceRole4F096552": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -624,7 +654,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] } @@ -638,7 +668,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] }, @@ -693,7 +723,7 @@ ] } }, - "MyCanaryThree968B1271": { + "ZipAssetA028C65F": { "Type": "AWS::Synthetics::Canary", "Properties": { "ArtifactS3Location": { @@ -702,7 +732,7 @@ [ "s3://", { - "Ref": "MyCanaryThreeArtifactsBucket894E857E" + "Ref": "ZipAssetArtifactsBucket8D4ED76C" } ] ] @@ -716,12 +746,12 @@ }, "ExecutionRoleArn": { "Fn::GetAtt": [ - "MyCanaryThreeServiceRole68117E65", + "ZipAssetServiceRole4F096552", "Arn" ] }, - "Name": "assetcanary-three", - "RuntimeVersion": "syn-nodejs-puppeteer-3.9", + "Name": "canaryonezipass32aaf5", + "RuntimeVersion": "syn-nodejs-puppeteer-4.0", "Schedule": { "DurationInSeconds": "0", "Expression": "rate(5 minutes)" @@ -729,7 +759,7 @@ "StartCanaryAfterCreation": true } }, - "MyCanaryFourArtifactsBucketE259973B": { + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932": { "Type": "AWS::S3::Bucket", "Properties": { "BucketEncryption": { @@ -745,11 +775,11 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyCanaryFourArtifactsBucketPolicy20BDB9D7": { + "SynNodejsPuppeteer39ArtifactsBucketPolicy502FE6AD": { "Type": "AWS::S3::BucketPolicy", "Properties": { "Bucket": { - "Ref": "MyCanaryFourArtifactsBucketE259973B" + "Ref": "SynNodejsPuppeteer39ArtifactsBucketC3BBB932" }, "PolicyDocument": { "Statement": [ @@ -767,7 +797,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] }, @@ -777,7 +807,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] }, @@ -792,7 +822,7 @@ } } }, - "MyCanaryFourServiceRoleA532F905": { + "SynNodejsPuppeteer39ServiceRole946A595A": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -821,7 +851,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] } @@ -835,7 +865,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] }, @@ -890,7 +920,7 @@ ] } }, - "MyCanaryFour15095F40": { + "SynNodejsPuppeteer3978815E0A": { "Type": "AWS::Synthetics::Canary", "Properties": { "ArtifactS3Location": { @@ -899,7 +929,7 @@ [ "s3://", { - "Ref": "MyCanaryFourArtifactsBucketE259973B" + "Ref": "SynNodejsPuppeteer39ArtifactsBucketC3BBB932" } ] ] @@ -909,24 +939,52 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + "S3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "ExecutionRoleArn": { "Fn::GetAtt": [ - "MyCanaryFourServiceRoleA532F905", + "SynNodejsPuppeteer39ServiceRole946A595A", "Arn" ] }, - "Name": "assetcanary-four", + "Name": "canaryonesynnodec5378", "RuntimeVersion": "syn-nodejs-puppeteer-3.9", "Schedule": { "DurationInSeconds": "0", "Expression": "rate(5 minutes)" }, - "StartCanaryAfterCreation": true + "StartCanaryAfterCreation": true, + "RunConfig": { + "EnvironmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, - "MyCanaryRuntime38ArtifactsBucket66BD74F0": { + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC": { "Type": "AWS::S3::Bucket", "Properties": { "BucketEncryption": { @@ -942,11 +1000,11 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyCanaryRuntime38ArtifactsBucketPolicy9D7ABC32": { + "SynNodejsPuppeteer40ArtifactsBucketPolicy881746F6": { "Type": "AWS::S3::BucketPolicy", "Properties": { "Bucket": { - "Ref": "MyCanaryRuntime38ArtifactsBucket66BD74F0" + "Ref": "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC" }, "PolicyDocument": { "Statement": [ @@ -964,7 +1022,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] }, @@ -974,7 +1032,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] }, @@ -989,7 +1047,7 @@ } } }, - "MyCanaryRuntime38ServiceRole9FE5290C": { + "SynNodejsPuppeteer40ServiceRole800C58BD": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -1018,7 +1076,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] } @@ -1032,7 +1090,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] }, @@ -1087,7 +1145,7 @@ ] } }, - "MyCanaryRuntime388C091D7C": { + "SynNodejsPuppeteer406C46FFAF": { "Type": "AWS::Synthetics::Canary", "Properties": { "ArtifactS3Location": { @@ -1096,7 +1154,7 @@ [ "s3://", { - "Ref": "MyCanaryRuntime38ArtifactsBucket66BD74F0" + "Ref": "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC" } ] ] @@ -1106,24 +1164,52 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + "S3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "ExecutionRoleArn": { "Fn::GetAtt": [ - "MyCanaryRuntime38ServiceRole9FE5290C", + "SynNodejsPuppeteer40ServiceRole800C58BD", "Arn" ] }, - "Name": "assetcanary-five", - "RuntimeVersion": "syn-nodejs-puppeteer-3.9", + "Name": "canaryonesynnodc37fe2", + "RuntimeVersion": "syn-nodejs-puppeteer-4.0", "Schedule": { "DurationInSeconds": "0", "Expression": "rate(5 minutes)" }, - "StartCanaryAfterCreation": true + "StartCanaryAfterCreation": true, + "RunConfig": { + "EnvironmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, - "MyPythonCanaryArtifactsBucket7AE88133": { + "SynPythonSelenium13ArtifactsBucket084C41C8": { "Type": "AWS::S3::Bucket", "Properties": { "BucketEncryption": { @@ -1139,11 +1225,11 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyPythonCanaryArtifactsBucketPolicy7E13B7C5": { + "SynPythonSelenium13ArtifactsBucketPolicyB7EBE638": { "Type": "AWS::S3::BucketPolicy", "Properties": { "Bucket": { - "Ref": "MyPythonCanaryArtifactsBucket7AE88133" + "Ref": "SynPythonSelenium13ArtifactsBucket084C41C8" }, "PolicyDocument": { "Statement": [ @@ -1161,7 +1247,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] }, @@ -1171,7 +1257,7 @@ [ { "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] }, @@ -1186,7 +1272,7 @@ } } }, - "MyPythonCanaryServiceRole41A363E1": { + "SynPythonSelenium13ServiceRoleD35450CA": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -1215,7 +1301,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] } @@ -1229,7 +1315,7 @@ [ { "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] }, @@ -1284,7 +1370,7 @@ ] } }, - "MyPythonCanary9A3DE09E": { + "SynPythonSelenium13F92D8275": { "Type": "AWS::Synthetics::Canary", "Properties": { "ArtifactS3Location": { @@ -1293,7 +1379,7 @@ [ "s3://", { - "Ref": "MyPythonCanaryArtifactsBucket7AE88133" + "Ref": "SynPythonSelenium13ArtifactsBucket084C41C8" } ] ] @@ -1303,21 +1389,228 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb.zip" + "S3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "ExecutionRoleArn": { "Fn::GetAtt": [ - "MyPythonCanaryServiceRole41A363E1", + "SynPythonSelenium13ServiceRoleD35450CA", "Arn" ] }, - "Name": "py-canary-integ", + "Name": "canaryonesynpyt659e03", "RuntimeVersion": "syn-python-selenium-1.3", "Schedule": { "DurationInSeconds": "0", "Expression": "rate(5 minutes)" }, - "StartCanaryAfterCreation": true + "StartCanaryAfterCreation": true, + "RunConfig": { + "EnvironmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } + } + } + }, + "Mappings": { + "DefaultCrNodeVersionMap": { + "af-south-1": { + "value": "nodejs16.x" + }, + "ap-east-1": { + "value": "nodejs16.x" + }, + "ap-northeast-1": { + "value": "nodejs16.x" + }, + "ap-northeast-2": { + "value": "nodejs16.x" + }, + "ap-northeast-3": { + "value": "nodejs16.x" + }, + "ap-south-1": { + "value": "nodejs16.x" + }, + "ap-south-2": { + "value": "nodejs16.x" + }, + "ap-southeast-1": { + "value": "nodejs16.x" + }, + "ap-southeast-2": { + "value": "nodejs16.x" + }, + "ap-southeast-3": { + "value": "nodejs16.x" + }, + "ca-central-1": { + "value": "nodejs16.x" + }, + "cn-north-1": { + "value": "nodejs16.x" + }, + "cn-northwest-1": { + "value": "nodejs16.x" + }, + "eu-central-1": { + "value": "nodejs16.x" + }, + "eu-central-2": { + "value": "nodejs16.x" + }, + "eu-north-1": { + "value": "nodejs16.x" + }, + "eu-south-1": { + "value": "nodejs16.x" + }, + "eu-south-2": { + "value": "nodejs16.x" + }, + "eu-west-1": { + "value": "nodejs16.x" + }, + "eu-west-2": { + "value": "nodejs16.x" + }, + "eu-west-3": { + "value": "nodejs16.x" + }, + "me-central-1": { + "value": "nodejs16.x" + }, + "me-south-1": { + "value": "nodejs16.x" + }, + "sa-east-1": { + "value": "nodejs16.x" + }, + "us-east-1": { + "value": "nodejs16.x" + }, + "us-east-2": { + "value": "nodejs16.x" + }, + "us-gov-east-1": { + "value": "nodejs16.x" + }, + "us-gov-west-1": { + "value": "nodejs16.x" + }, + "us-iso-east-1": { + "value": "nodejs14.x" + }, + "us-iso-west-1": { + "value": "nodejs14.x" + }, + "us-isob-east-1": { + "value": "nodejs14.x" + }, + "us-west-1": { + "value": "nodejs16.x" + }, + "us-west-2": { + "value": "nodejs16.x" + } + } + }, + "Outputs": { + "ApiGatewayEndpoint5AA8EC3A": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + }, + "ExportsOutputRefInlineAsset5EAEB9B5D9353D4F": { + "Value": { + "Ref": "InlineAsset5EAEB9B5" + }, + "Export": { + "Name": "canary-one:ExportsOutputRefInlineAsset5EAEB9B5D9353D4F" + } + }, + "ExportsOutputRefDirectoryAssetB49EFE5C6067345C": { + "Value": { + "Ref": "DirectoryAssetB49EFE5C" + }, + "Export": { + "Name": "canary-one:ExportsOutputRefDirectoryAssetB49EFE5C6067345C" + } + }, + "ExportsOutputRefZipAssetA028C65FBA619339": { + "Value": { + "Ref": "ZipAssetA028C65F" + }, + "Export": { + "Name": "canary-one:ExportsOutputRefZipAssetA028C65FBA619339" + } + }, + "ExportsOutputRefSynNodejsPuppeteer3978815E0AC2F26208": { + "Value": { + "Ref": "SynNodejsPuppeteer3978815E0A" + }, + "Export": { + "Name": "canary-one:ExportsOutputRefSynNodejsPuppeteer3978815E0AC2F26208" + } + }, + "ExportsOutputRefSynNodejsPuppeteer406C46FFAF8F9722F2": { + "Value": { + "Ref": "SynNodejsPuppeteer406C46FFAF" + }, + "Export": { + "Name": "canary-one:ExportsOutputRefSynNodejsPuppeteer406C46FFAF8F9722F2" + } + }, + "ExportsOutputRefSynPythonSelenium13F92D8275979DE724": { + "Value": { + "Ref": "SynPythonSelenium13F92D8275" + }, + "Export": { + "Name": "canary-one:ExportsOutputRefSynPythonSelenium13F92D8275979DE724" } } }, @@ -1355,4 +1648,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/cdk.out b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/cdk.out index d8b441d447f8a..7925065efbcc4 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"29.0.0"} \ No newline at end of file +{"version":"31.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/integ.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/integ.json index 3f7c328bc7c87..5fa1759b97257 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "29.0.0", + "version": "31.0.0", "testCases": { - "integ.canary": { + "IntegCanaryTest/DefaultTest": { "stacks": [ "canary-one" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "IntegCanaryTest/DefaultTest/DeployAssert", + "assertionStackName": "IntegCanaryTestDefaultTestDeployAssert3AD5A094" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/manifest.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/manifest.json index 9227c8561fcef..a83fa44d4a482 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "31.0.0", "artifacts": { "canary-one.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,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}/4c74166545778fe2f895f948e7d6aec9c5427ffedc8ba02dcb70d5c2ea975967.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c709965b3969e2b12617e4e0b3c4c552609571cb59f716078510e31e5c89437.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -33,166 +33,238 @@ "canary-one.assets" ], "metadata": { - "/canary-one/mytestbucket/Resource": [ + "/canary-one/MyTestBucket/Resource": [ { "type": "aws:cdk:logicalId", - "data": "mytestbucket8DC16178" + "data": "MyTestBucket81062429" } ], - "/canary-one/MyCanary/ServiceRole/Resource": [ + "/canary-one/MyTestBucket/Policy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryServiceRole593F9DD9" + "data": "MyTestBucketPolicyE11AF29F" } ], - "/canary-one/MyCanary/Resource": [ + "/canary-one/MyTestBucket/AutoDeleteObjectsCustomResource/Default": [ { "type": "aws:cdk:logicalId", - "data": "MyCanary1A94CAFA" + "data": "MyTestBucketAutoDeleteObjectsCustomResource1E1AC890" } ], - "/canary-one/MyCanaryOne/ArtifactsBucket/Resource": [ + "/canary-one/DefaultCrNodeVersionMap": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryOneArtifactsBucketDF4A487D" + "data": "DefaultCrNodeVersionMap" } ], - "/canary-one/MyCanaryOne/ArtifactsBucket/Policy/Resource": [ + "/canary-one/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryOneArtifactsBucketPolicyA2B99545" + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" } ], - "/canary-one/MyCanaryOne/ServiceRole/Resource": [ + "/canary-one/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryOneServiceRole41995561" + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" } ], - "/canary-one/MyCanaryOne/Resource": [ + "/canary-one/ApiGateway/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryOneEF6A9CB9" + "data": "ApiGateway11E7F47B" } ], - "/canary-one/MyCanaryTwo/ArtifactsBucket/Resource": [ + "/canary-one/ApiGateway/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryTwoArtifactsBucket79B179B6" + "data": "ApiGatewayDeploymentA26796E849bfdafc1a375345a13992f6e2987daf" } ], - "/canary-one/MyCanaryTwo/ArtifactsBucket/Policy/Resource": [ + "/canary-one/ApiGateway/DeploymentStage.prod/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryTwoArtifactsBucketPolicy4719E279" + "data": "ApiGatewayDeploymentStageprod1C6D5CD6" } ], - "/canary-one/MyCanaryTwo/ServiceRole/Resource": [ + "/canary-one/ApiGateway/Endpoint": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryTwoServiceRole041E85D4" + "data": "ApiGatewayEndpoint5AA8EC3A" } ], - "/canary-one/MyCanaryTwo/Resource": [ + "/canary-one/ApiGateway/Default/GET/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryTwo6501D55F" + "data": "ApiGatewayGET25EBFEA3" } ], - "/canary-one/MyCanaryThree/ArtifactsBucket/Resource": [ + "/canary-one/InlineAsset/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryThreeArtifactsBucket894E857E" + "data": "InlineAssetServiceRole90EB5484" } ], - "/canary-one/MyCanaryThree/ArtifactsBucket/Policy/Resource": [ + "/canary-one/InlineAsset/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryThreeArtifactsBucketPolicy568A97F7" + "data": "InlineAsset5EAEB9B5" } ], - "/canary-one/MyCanaryThree/ServiceRole/Resource": [ + "/canary-one/DirectoryAsset/ArtifactsBucket/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryThreeServiceRole68117E65" + "data": "DirectoryAssetArtifactsBucketA79AFD6C" } ], - "/canary-one/MyCanaryThree/Resource": [ + "/canary-one/DirectoryAsset/ArtifactsBucket/Policy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryThree968B1271" + "data": "DirectoryAssetArtifactsBucketPolicy6F51B03A" } ], - "/canary-one/MyCanaryFour/ArtifactsBucket/Resource": [ + "/canary-one/DirectoryAsset/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryFourArtifactsBucketE259973B" + "data": "DirectoryAssetServiceRole6C204C16" } ], - "/canary-one/MyCanaryFour/ArtifactsBucket/Policy/Resource": [ + "/canary-one/DirectoryAsset/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryFourArtifactsBucketPolicy20BDB9D7" + "data": "DirectoryAssetB49EFE5C" } ], - "/canary-one/MyCanaryFour/ServiceRole/Resource": [ + "/canary-one/ZipAsset/ArtifactsBucket/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryFourServiceRoleA532F905" + "data": "ZipAssetArtifactsBucket8D4ED76C" } ], - "/canary-one/MyCanaryFour/Resource": [ + "/canary-one/ZipAsset/ArtifactsBucket/Policy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryFour15095F40" + "data": "ZipAssetArtifactsBucketPolicy14B38CC6" } ], - "/canary-one/MyCanaryRuntime38/ArtifactsBucket/Resource": [ + "/canary-one/ZipAsset/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryRuntime38ArtifactsBucket66BD74F0" + "data": "ZipAssetServiceRole4F096552" } ], - "/canary-one/MyCanaryRuntime38/ArtifactsBucket/Policy/Resource": [ + "/canary-one/ZipAsset/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryRuntime38ArtifactsBucketPolicy9D7ABC32" + "data": "ZipAssetA028C65F" } ], - "/canary-one/MyCanaryRuntime38/ServiceRole/Resource": [ + "/canary-one/SynNodejsPuppeteer39/ArtifactsBucket/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryRuntime38ServiceRole9FE5290C" + "data": "SynNodejsPuppeteer39ArtifactsBucketC3BBB932" } ], - "/canary-one/MyCanaryRuntime38/Resource": [ + "/canary-one/SynNodejsPuppeteer39/ArtifactsBucket/Policy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyCanaryRuntime388C091D7C" + "data": "SynNodejsPuppeteer39ArtifactsBucketPolicy502FE6AD" } ], - "/canary-one/MyPythonCanary/ArtifactsBucket/Resource": [ + "/canary-one/SynNodejsPuppeteer39/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyPythonCanaryArtifactsBucket7AE88133" + "data": "SynNodejsPuppeteer39ServiceRole946A595A" } ], - "/canary-one/MyPythonCanary/ArtifactsBucket/Policy/Resource": [ + "/canary-one/SynNodejsPuppeteer39/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyPythonCanaryArtifactsBucketPolicy7E13B7C5" + "data": "SynNodejsPuppeteer3978815E0A" } ], - "/canary-one/MyPythonCanary/ServiceRole/Resource": [ + "/canary-one/SynNodejsPuppeteer40/ArtifactsBucket/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyPythonCanaryServiceRole41A363E1" + "data": "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC" } ], - "/canary-one/MyPythonCanary/Resource": [ + "/canary-one/SynNodejsPuppeteer40/ArtifactsBucket/Policy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyPythonCanary9A3DE09E" + "data": "SynNodejsPuppeteer40ArtifactsBucketPolicy881746F6" + } + ], + "/canary-one/SynNodejsPuppeteer40/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SynNodejsPuppeteer40ServiceRole800C58BD" + } + ], + "/canary-one/SynNodejsPuppeteer40/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SynNodejsPuppeteer406C46FFAF" + } + ], + "/canary-one/SynPythonSelenium13/ArtifactsBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SynPythonSelenium13ArtifactsBucket084C41C8" + } + ], + "/canary-one/SynPythonSelenium13/ArtifactsBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SynPythonSelenium13ArtifactsBucketPolicyB7EBE638" + } + ], + "/canary-one/SynPythonSelenium13/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SynPythonSelenium13ServiceRoleD35450CA" + } + ], + "/canary-one/SynPythonSelenium13/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SynPythonSelenium13F92D8275" + } + ], + "/canary-one/Exports/Output{\"Ref\":\"InlineAsset5EAEB9B5\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefInlineAsset5EAEB9B5D9353D4F" + } + ], + "/canary-one/Exports/Output{\"Ref\":\"DirectoryAssetB49EFE5C\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefDirectoryAssetB49EFE5C6067345C" + } + ], + "/canary-one/Exports/Output{\"Ref\":\"ZipAssetA028C65F\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefZipAssetA028C65FBA619339" + } + ], + "/canary-one/Exports/Output{\"Ref\":\"SynNodejsPuppeteer3978815E0A\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefSynNodejsPuppeteer3978815E0AC2F26208" + } + ], + "/canary-one/Exports/Output{\"Ref\":\"SynNodejsPuppeteer406C46FFAF\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefSynNodejsPuppeteer406C46FFAF8F9722F2" + } + ], + "/canary-one/Exports/Output{\"Ref\":\"SynPythonSelenium13F92D8275\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefSynPythonSelenium13F92D8275979DE724" } ], "/canary-one/BootstrapVersion": [ @@ -210,6 +282,306 @@ }, "displayName": "canary-one" }, + "IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "IntegCanaryTestDefaultTestDeployAssert3AD5A094": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "IntegCanaryTestDefaultTestDeployAssert3AD5A094.template.json", + "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}/0d889e0d833f8b9b09eff9583a832802952f1f7f181507ea7cec6916c2721470.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "canary-one", + "IntegCanaryTestDefaultTestDeployAssert3AD5A094.assets" + ], + "metadata": { + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForIsCompleteProviderInvoke08378048" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForTimeoutProviderInvoke721B9141" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitForRole31110FCC" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46WaitFor3322FCE2" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aRoleB84BD8CE" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForIsCompleteProviderInvoke6FE02642" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForTimeoutProviderInvoke4EC1BFB5" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForRole9BDDAD93" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792WaitForF1DFDA7C" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForIsCompleteProviderInvoke676F4DDB" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForTimeoutProviderInvoke3CC34AEA" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForRole0C9EEFC1" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6feWaitForDB2A9921" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForIsCompleteProviderInvokeEFBEE0D2" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForTimeoutProviderInvoke0A0F7C7B" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitForRoleF3F1B67B" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5aeWaitFor2AE5B3D5" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForIsCompleteProviderInvoke28F4AB77" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForTimeoutProviderInvoke78F920F8" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitForRoleACF107E5" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60WaitFor8805095D" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForIsCompleteProviderInvokeA008B058" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForTimeoutProviderInvoke5934B864" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForRole9256B779" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2WaitForB088533D" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/IntegCanaryTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "IntegCanaryTest/DefaultTest/DeployAssert" + }, "Tree": { "type": "cdk:tree", "properties": { diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/tree.json b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/tree.json index 1125b4f366cc6..30b6ce83399e1 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.js.snapshot/tree.json @@ -8,47 +8,333 @@ "id": "canary-one", "path": "canary-one", "children": { - "mytestbucket": { - "id": "mytestbucket", - "path": "canary-one/mytestbucket", + "MyTestBucket": { + "id": "MyTestBucket", + "path": "canary-one/MyTestBucket", "children": { "Resource": { "id": "Resource", - "path": "canary-one/mytestbucket/Resource", + "path": "canary-one/MyTestBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", - "aws:cdk:cloudformation:props": {} + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Policy": { + "id": "Policy", + "path": "canary-one/MyTestBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/MyTestBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "MyTestBucket81062429" + }, + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "MyTestBucket81062429", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyTestBucket81062429", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "canary-one/MyTestBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "canary-one/MyTestBucket/AutoDeleteObjectsCustomResource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "DefaultCrNodeVersionMap": { + "id": "DefaultCrNodeVersionMap", + "path": "canary-one/DefaultCrNodeVersionMap", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Custom::S3AutoDeleteObjectsCustomResourceProvider": { + "id": "Custom::S3AutoDeleteObjectsCustomResourceProvider", + "path": "canary-one/Custom::S3AutoDeleteObjectsCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "canary-one/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Role": { + "id": "Role", + "path": "canary-one/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Handler": { + "id": "Handler", + "path": "canary-one/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "ApiGateway": { + "id": "ApiGateway", + "path": "canary-one/ApiGateway", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/ApiGateway/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::RestApi", + "aws:cdk:cloudformation:props": { + "name": "ApiGateway" + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Deployment": { + "id": "Deployment", + "path": "canary-one/ApiGateway/Deployment", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/ApiGateway/Deployment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Deployment", + "aws:cdk:cloudformation:props": { + "restApiId": { + "Ref": "ApiGateway11E7F47B" + }, + "description": "Automatically created by the RestApi construct" + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "DeploymentStage.prod": { + "id": "DeploymentStage.prod", + "path": "canary-one/ApiGateway/DeploymentStage.prod", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/ApiGateway/DeploymentStage.prod/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Stage", + "aws:cdk:cloudformation:props": { + "restApiId": { + "Ref": "ApiGateway11E7F47B" + }, + "deploymentId": { + "Ref": "ApiGatewayDeploymentA26796E849bfdafc1a375345a13992f6e2987daf" + }, + "stageName": "prod" + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Endpoint": { + "id": "Endpoint", + "path": "canary-one/ApiGateway/Endpoint", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Default": { + "id": "Default", + "path": "canary-one/ApiGateway/Default", + "children": { + "GET": { + "id": "GET", + "path": "canary-one/ApiGateway/Default/GET", + "children": { + "Resource": { + "id": "Resource", + "path": "canary-one/ApiGateway/Default/GET/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", + "aws:cdk:cloudformation:props": { + "httpMethod": "GET", + "resourceId": { + "Fn::GetAtt": [ + "ApiGateway11E7F47B", + "RootResourceId" + ] + }, + "restApiId": { + "Ref": "ApiGateway11E7F47B" + }, + "authorizationType": "NONE", + "integration": { + "type": "MOCK", + "requestTemplates": { + "application/json": "{ \"statusCode\": 200 }" + }, + "passthroughBehavior": "NEVER", + "integrationResponses": [ + { + "statusCode": "200" + } + ] + }, + "methodResponses": [ + { + "statusCode": "200" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } }, - "MyCanary": { - "id": "MyCanary", - "path": "canary-one/MyCanary", + "InlineAsset": { + "id": "InlineAsset", + "path": "canary-one/InlineAsset", "children": { "ServiceRole": { "id": "ServiceRole", - "path": "canary-one/MyCanary/ServiceRole", + "path": "canary-one/InlineAsset/ServiceRole", "children": { "ImportServiceRole": { "id": "ImportServiceRole", - "path": "canary-one/MyCanary/ServiceRole/ImportServiceRole", + "path": "canary-one/InlineAsset/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanary/ServiceRole/Resource", + "path": "canary-one/InlineAsset/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -79,7 +365,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "mytestbucket8DC16178", + "MyTestBucket81062429", "Arn" ] } @@ -93,7 +379,7 @@ [ { "Fn::GetAtt": [ - "mytestbucket8DC16178", + "MyTestBucket81062429", "Arn" ] }, @@ -148,19 +434,19 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanary/Resource", + "path": "canary-one/InlineAsset/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", "aws:cdk:cloudformation:props": { @@ -170,7 +456,7 @@ [ "s3://", { - "Ref": "mytestbucket8DC16178" + "Ref": "MyTestBucket81062429" }, "/integ" ] @@ -182,12 +468,12 @@ }, "executionRoleArn": { "Fn::GetAtt": [ - "MyCanaryServiceRole593F9DD9", + "InlineAssetServiceRole90EB5484", "Arn" ] }, - "name": "canary-integ", - "runtimeVersion": "syn-nodejs-puppeteer-3.9", + "name": "canaryoneinline66eeb2", + "runtimeVersion": "syn-nodejs-puppeteer-4.0", "schedule": { "durationInSeconds": "0", "expression": "rate(1 minute)" @@ -196,27 +482,27 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", + "fqn": "@aws-cdk/aws-synthetics-alpha.Canary", "version": "0.0.0" } }, - "MyCanaryOne": { - "id": "MyCanaryOne", - "path": "canary-one/MyCanaryOne", + "DirectoryAsset": { + "id": "DirectoryAsset", + "path": "canary-one/DirectoryAsset", "children": { "ArtifactsBucket": { "id": "ArtifactsBucket", - "path": "canary-one/MyCanaryOne/ArtifactsBucket", + "path": "canary-one/DirectoryAsset/ArtifactsBucket", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryOne/ArtifactsBucket/Resource", + "path": "canary-one/DirectoryAsset/ArtifactsBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": { @@ -232,22 +518,22 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Policy": { "id": "Policy", - "path": "canary-one/MyCanaryOne/ArtifactsBucket/Policy", + "path": "canary-one/DirectoryAsset/ArtifactsBucket/Policy", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryOne/ArtifactsBucket/Policy/Resource", + "path": "canary-one/DirectoryAsset/ArtifactsBucket/Policy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", "aws:cdk:cloudformation:props": { "bucket": { - "Ref": "MyCanaryOneArtifactsBucketDF4A487D" + "Ref": "DirectoryAssetArtifactsBucketA79AFD6C" }, "policyDocument": { "Statement": [ @@ -265,7 +551,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] }, @@ -275,7 +561,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] }, @@ -291,37 +577,37 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "ServiceRole": { "id": "ServiceRole", - "path": "canary-one/MyCanaryOne/ServiceRole", + "path": "canary-one/DirectoryAsset/ServiceRole", "children": { "ImportServiceRole": { "id": "ImportServiceRole", - "path": "canary-one/MyCanaryOne/ServiceRole/ImportServiceRole", + "path": "canary-one/DirectoryAsset/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryOne/ServiceRole/Resource", + "path": "canary-one/DirectoryAsset/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -352,7 +638,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] } @@ -366,7 +652,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryOneArtifactsBucketDF4A487D", + "DirectoryAssetArtifactsBucketA79AFD6C", "Arn" ] }, @@ -421,45 +707,45 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Code": { "id": "Code", - "path": "canary-one/MyCanaryOne/Code", + "path": "canary-one/DirectoryAsset/Code", "children": { "Stage": { "id": "Stage", - "path": "canary-one/MyCanaryOne/Code/Stage", + "path": "canary-one/DirectoryAsset/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "AssetBucket": { "id": "AssetBucket", - "path": "canary-one/MyCanaryOne/Code/AssetBucket", + "path": "canary-one/DirectoryAsset/Code/AssetBucket", "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryOne/Resource", + "path": "canary-one/DirectoryAsset/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", "aws:cdk:cloudformation:props": { @@ -469,7 +755,7 @@ [ "s3://", { - "Ref": "MyCanaryOneArtifactsBucketDF4A487D" + "Ref": "DirectoryAssetArtifactsBucketA79AFD6C" } ] ] @@ -479,46 +765,74 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb.zip" + "s3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "executionRoleArn": { "Fn::GetAtt": [ - "MyCanaryOneServiceRole41995561", + "DirectoryAssetServiceRole6C204C16", "Arn" ] }, - "name": "assetcanary-one", - "runtimeVersion": "syn-nodejs-puppeteer-3.9", + "name": "canaryonedirect63ce4e", + "runtimeVersion": "syn-nodejs-puppeteer-4.0", "schedule": { "durationInSeconds": "0", "expression": "rate(5 minutes)" }, "startCanaryAfterCreation": true, - "deleteLambdaResourcesOnCanaryDeletion": true + "deleteLambdaResourcesOnCanaryDeletion": true, + "runConfig": { + "environmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", + "fqn": "@aws-cdk/aws-synthetics-alpha.Canary", "version": "0.0.0" } }, - "MyCanaryTwo": { - "id": "MyCanaryTwo", - "path": "canary-one/MyCanaryTwo", + "ZipAsset": { + "id": "ZipAsset", + "path": "canary-one/ZipAsset", "children": { "ArtifactsBucket": { "id": "ArtifactsBucket", - "path": "canary-one/MyCanaryTwo/ArtifactsBucket", + "path": "canary-one/ZipAsset/ArtifactsBucket", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryTwo/ArtifactsBucket/Resource", + "path": "canary-one/ZipAsset/ArtifactsBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": { @@ -534,22 +848,22 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Policy": { "id": "Policy", - "path": "canary-one/MyCanaryTwo/ArtifactsBucket/Policy", + "path": "canary-one/ZipAsset/ArtifactsBucket/Policy", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryTwo/ArtifactsBucket/Policy/Resource", + "path": "canary-one/ZipAsset/ArtifactsBucket/Policy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", "aws:cdk:cloudformation:props": { "bucket": { - "Ref": "MyCanaryTwoArtifactsBucket79B179B6" + "Ref": "ZipAssetArtifactsBucket8D4ED76C" }, "policyDocument": { "Statement": [ @@ -567,7 +881,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] }, @@ -577,7 +891,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] }, @@ -593,37 +907,37 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "ServiceRole": { "id": "ServiceRole", - "path": "canary-one/MyCanaryTwo/ServiceRole", + "path": "canary-one/ZipAsset/ServiceRole", "children": { "ImportServiceRole": { "id": "ImportServiceRole", - "path": "canary-one/MyCanaryTwo/ServiceRole/ImportServiceRole", + "path": "canary-one/ZipAsset/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryTwo/ServiceRole/Resource", + "path": "canary-one/ZipAsset/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -654,7 +968,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] } @@ -668,7 +982,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryTwoArtifactsBucket79B179B6", + "ZipAssetArtifactsBucket8D4ED76C", "Arn" ] }, @@ -723,45 +1037,45 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Code": { "id": "Code", - "path": "canary-one/MyCanaryTwo/Code", + "path": "canary-one/ZipAsset/Code", "children": { "Stage": { "id": "Stage", - "path": "canary-one/MyCanaryTwo/Code/Stage", + "path": "canary-one/ZipAsset/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "AssetBucket": { "id": "AssetBucket", - "path": "canary-one/MyCanaryTwo/Code/AssetBucket", + "path": "canary-one/ZipAsset/Code/AssetBucket", "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryTwo/Resource", + "path": "canary-one/ZipAsset/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", "aws:cdk:cloudformation:props": { @@ -771,7 +1085,7 @@ [ "s3://", { - "Ref": "MyCanaryTwoArtifactsBucket79B179B6" + "Ref": "ZipAssetArtifactsBucket8D4ED76C" } ] ] @@ -785,12 +1099,12 @@ }, "executionRoleArn": { "Fn::GetAtt": [ - "MyCanaryTwoServiceRole041E85D4", + "ZipAssetServiceRole4F096552", "Arn" ] }, - "name": "assetcanary-two", - "runtimeVersion": "syn-nodejs-puppeteer-3.9", + "name": "canaryonezipass32aaf5", + "runtimeVersion": "syn-nodejs-puppeteer-4.0", "schedule": { "durationInSeconds": "0", "expression": "rate(5 minutes)" @@ -799,27 +1113,27 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", + "fqn": "@aws-cdk/aws-synthetics-alpha.Canary", "version": "0.0.0" } }, - "MyCanaryThree": { - "id": "MyCanaryThree", - "path": "canary-one/MyCanaryThree", + "SynNodejsPuppeteer39": { + "id": "SynNodejsPuppeteer39", + "path": "canary-one/SynNodejsPuppeteer39", "children": { "ArtifactsBucket": { "id": "ArtifactsBucket", - "path": "canary-one/MyCanaryThree/ArtifactsBucket", + "path": "canary-one/SynNodejsPuppeteer39/ArtifactsBucket", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryThree/ArtifactsBucket/Resource", + "path": "canary-one/SynNodejsPuppeteer39/ArtifactsBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": { @@ -835,22 +1149,22 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Policy": { "id": "Policy", - "path": "canary-one/MyCanaryThree/ArtifactsBucket/Policy", + "path": "canary-one/SynNodejsPuppeteer39/ArtifactsBucket/Policy", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryThree/ArtifactsBucket/Policy/Resource", + "path": "canary-one/SynNodejsPuppeteer39/ArtifactsBucket/Policy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", "aws:cdk:cloudformation:props": { "bucket": { - "Ref": "MyCanaryThreeArtifactsBucket894E857E" + "Ref": "SynNodejsPuppeteer39ArtifactsBucketC3BBB932" }, "policyDocument": { "Statement": [ @@ -868,7 +1182,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] }, @@ -878,7 +1192,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] }, @@ -894,37 +1208,37 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "ServiceRole": { "id": "ServiceRole", - "path": "canary-one/MyCanaryThree/ServiceRole", + "path": "canary-one/SynNodejsPuppeteer39/ServiceRole", "children": { "ImportServiceRole": { "id": "ImportServiceRole", - "path": "canary-one/MyCanaryThree/ServiceRole/ImportServiceRole", + "path": "canary-one/SynNodejsPuppeteer39/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryThree/ServiceRole/Resource", + "path": "canary-one/SynNodejsPuppeteer39/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -955,7 +1269,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] } @@ -969,7 +1283,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryThreeArtifactsBucket894E857E", + "SynNodejsPuppeteer39ArtifactsBucketC3BBB932", "Arn" ] }, @@ -1024,45 +1338,45 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Code": { "id": "Code", - "path": "canary-one/MyCanaryThree/Code", + "path": "canary-one/SynNodejsPuppeteer39/Code", "children": { "Stage": { "id": "Stage", - "path": "canary-one/MyCanaryThree/Code/Stage", + "path": "canary-one/SynNodejsPuppeteer39/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "AssetBucket": { "id": "AssetBucket", - "path": "canary-one/MyCanaryThree/Code/AssetBucket", + "path": "canary-one/SynNodejsPuppeteer39/Code/AssetBucket", "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryThree/Resource", + "path": "canary-one/SynNodejsPuppeteer39/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", "aws:cdk:cloudformation:props": { @@ -1072,7 +1386,7 @@ [ "s3://", { - "Ref": "MyCanaryThreeArtifactsBucket894E857E" + "Ref": "SynNodejsPuppeteer39ArtifactsBucketC3BBB932" } ] ] @@ -1082,45 +1396,73 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + "s3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "executionRoleArn": { "Fn::GetAtt": [ - "MyCanaryThreeServiceRole68117E65", + "SynNodejsPuppeteer39ServiceRole946A595A", "Arn" ] }, - "name": "assetcanary-three", + "name": "canaryonesynnodec5378", "runtimeVersion": "syn-nodejs-puppeteer-3.9", "schedule": { "durationInSeconds": "0", "expression": "rate(5 minutes)" }, - "startCanaryAfterCreation": true + "startCanaryAfterCreation": true, + "runConfig": { + "environmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", + "fqn": "@aws-cdk/aws-synthetics-alpha.Canary", "version": "0.0.0" } }, - "MyCanaryFour": { - "id": "MyCanaryFour", - "path": "canary-one/MyCanaryFour", + "SynNodejsPuppeteer40": { + "id": "SynNodejsPuppeteer40", + "path": "canary-one/SynNodejsPuppeteer40", "children": { "ArtifactsBucket": { "id": "ArtifactsBucket", - "path": "canary-one/MyCanaryFour/ArtifactsBucket", + "path": "canary-one/SynNodejsPuppeteer40/ArtifactsBucket", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryFour/ArtifactsBucket/Resource", + "path": "canary-one/SynNodejsPuppeteer40/ArtifactsBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": { @@ -1136,22 +1478,22 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Policy": { "id": "Policy", - "path": "canary-one/MyCanaryFour/ArtifactsBucket/Policy", + "path": "canary-one/SynNodejsPuppeteer40/ArtifactsBucket/Policy", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryFour/ArtifactsBucket/Policy/Resource", + "path": "canary-one/SynNodejsPuppeteer40/ArtifactsBucket/Policy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", "aws:cdk:cloudformation:props": { "bucket": { - "Ref": "MyCanaryFourArtifactsBucketE259973B" + "Ref": "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC" }, "policyDocument": { "Statement": [ @@ -1169,7 +1511,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] }, @@ -1179,7 +1521,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] }, @@ -1195,37 +1537,37 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "ServiceRole": { "id": "ServiceRole", - "path": "canary-one/MyCanaryFour/ServiceRole", + "path": "canary-one/SynNodejsPuppeteer40/ServiceRole", "children": { "ImportServiceRole": { "id": "ImportServiceRole", - "path": "canary-one/MyCanaryFour/ServiceRole/ImportServiceRole", + "path": "canary-one/SynNodejsPuppeteer40/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryFour/ServiceRole/Resource", + "path": "canary-one/SynNodejsPuppeteer40/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -1256,7 +1598,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] } @@ -1270,7 +1612,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryFourArtifactsBucketE259973B", + "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC", "Arn" ] }, @@ -1325,45 +1667,45 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Code": { "id": "Code", - "path": "canary-one/MyCanaryFour/Code", + "path": "canary-one/SynNodejsPuppeteer40/Code", "children": { "Stage": { "id": "Stage", - "path": "canary-one/MyCanaryFour/Code/Stage", + "path": "canary-one/SynNodejsPuppeteer40/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "AssetBucket": { "id": "AssetBucket", - "path": "canary-one/MyCanaryFour/Code/AssetBucket", + "path": "canary-one/SynNodejsPuppeteer40/Code/AssetBucket", "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryFour/Resource", + "path": "canary-one/SynNodejsPuppeteer40/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", "aws:cdk:cloudformation:props": { @@ -1373,7 +1715,7 @@ [ "s3://", { - "Ref": "MyCanaryFourArtifactsBucketE259973B" + "Ref": "SynNodejsPuppeteer40ArtifactsBucket30A9D9DC" } ] ] @@ -1383,45 +1725,73 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + "s3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "executionRoleArn": { "Fn::GetAtt": [ - "MyCanaryFourServiceRoleA532F905", + "SynNodejsPuppeteer40ServiceRole800C58BD", "Arn" ] }, - "name": "assetcanary-four", - "runtimeVersion": "syn-nodejs-puppeteer-3.9", + "name": "canaryonesynnodc37fe2", + "runtimeVersion": "syn-nodejs-puppeteer-4.0", "schedule": { "durationInSeconds": "0", "expression": "rate(5 minutes)" }, - "startCanaryAfterCreation": true + "startCanaryAfterCreation": true, + "runConfig": { + "environmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", + "fqn": "@aws-cdk/aws-synthetics-alpha.Canary", "version": "0.0.0" } }, - "MyCanaryRuntime38": { - "id": "MyCanaryRuntime38", - "path": "canary-one/MyCanaryRuntime38", + "SynPythonSelenium13": { + "id": "SynPythonSelenium13", + "path": "canary-one/SynPythonSelenium13", "children": { "ArtifactsBucket": { "id": "ArtifactsBucket", - "path": "canary-one/MyCanaryRuntime38/ArtifactsBucket", + "path": "canary-one/SynPythonSelenium13/ArtifactsBucket", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryRuntime38/ArtifactsBucket/Resource", + "path": "canary-one/SynPythonSelenium13/ArtifactsBucket/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::Bucket", "aws:cdk:cloudformation:props": { @@ -1437,22 +1807,22 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Policy": { "id": "Policy", - "path": "canary-one/MyCanaryRuntime38/ArtifactsBucket/Policy", + "path": "canary-one/SynPythonSelenium13/ArtifactsBucket/Policy", "children": { "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryRuntime38/ArtifactsBucket/Policy/Resource", + "path": "canary-one/SynPythonSelenium13/ArtifactsBucket/Policy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", "aws:cdk:cloudformation:props": { "bucket": { - "Ref": "MyCanaryRuntime38ArtifactsBucket66BD74F0" + "Ref": "SynPythonSelenium13ArtifactsBucket084C41C8" }, "policyDocument": { "Statement": [ @@ -1470,7 +1840,7 @@ "Resource": [ { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] }, @@ -1480,7 +1850,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] }, @@ -1496,37 +1866,37 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "ServiceRole": { "id": "ServiceRole", - "path": "canary-one/MyCanaryRuntime38/ServiceRole", + "path": "canary-one/SynPythonSelenium13/ServiceRole", "children": { "ImportServiceRole": { "id": "ImportServiceRole", - "path": "canary-one/MyCanaryRuntime38/ServiceRole/ImportServiceRole", + "path": "canary-one/SynPythonSelenium13/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryRuntime38/ServiceRole/Resource", + "path": "canary-one/SynPythonSelenium13/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -1557,7 +1927,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] } @@ -1571,7 +1941,7 @@ [ { "Fn::GetAtt": [ - "MyCanaryRuntime38ArtifactsBucket66BD74F0", + "SynPythonSelenium13ArtifactsBucket084C41C8", "Arn" ] }, @@ -1626,45 +1996,45 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Code": { "id": "Code", - "path": "canary-one/MyCanaryRuntime38/Code", + "path": "canary-one/SynPythonSelenium13/Code", "children": { "Stage": { "id": "Stage", - "path": "canary-one/MyCanaryRuntime38/Code/Stage", + "path": "canary-one/SynPythonSelenium13/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "AssetBucket": { "id": "AssetBucket", - "path": "canary-one/MyCanaryRuntime38/Code/AssetBucket", + "path": "canary-one/SynPythonSelenium13/Code/AssetBucket", "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } }, "Resource": { "id": "Resource", - "path": "canary-one/MyCanaryRuntime38/Resource", + "path": "canary-one/SynPythonSelenium13/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", "aws:cdk:cloudformation:props": { @@ -1674,7 +2044,7 @@ [ "s3://", { - "Ref": "MyCanaryRuntime38ArtifactsBucket66BD74F0" + "Ref": "SynPythonSelenium13ArtifactsBucket084C41C8" } ] ] @@ -1684,354 +2054,1087 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "b1b777dcb79a2fa2790059927207d10bf5f4747d6dd1516e2780726d9d6fa820.zip" + "s3Key": "c33f4b91df43c8c958548ed571d6d05b4e3a4fa56a7e43aa5ba849f3d96d1699.zip" }, "executionRoleArn": { "Fn::GetAtt": [ - "MyCanaryRuntime38ServiceRole9FE5290C", + "SynPythonSelenium13ServiceRoleD35450CA", "Arn" ] }, - "name": "assetcanary-five", - "runtimeVersion": "syn-nodejs-puppeteer-3.9", + "name": "canaryonesynpyt659e03", + "runtimeVersion": "syn-python-selenium-1.3", "schedule": { "durationInSeconds": "0", "expression": "rate(5 minutes)" }, - "startCanaryAfterCreation": true + "startCanaryAfterCreation": true, + "runConfig": { + "environmentVariables": { + "URL": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "ApiGateway11E7F47B" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "ApiGatewayDeploymentStageprod1C6D5CD6" + }, + "/" + ] + ] + } + } + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", + "fqn": "@aws-cdk/aws-synthetics-alpha.Canary", "version": "0.0.0" } }, - "MyPythonCanary": { - "id": "MyPythonCanary", - "path": "canary-one/MyPythonCanary", + "Exports": { + "id": "Exports", + "path": "canary-one/Exports", "children": { - "ArtifactsBucket": { - "id": "ArtifactsBucket", - "path": "canary-one/MyPythonCanary/ArtifactsBucket", + "Output{\"Ref\":\"InlineAsset5EAEB9B5\"}": { + "id": "Output{\"Ref\":\"InlineAsset5EAEB9B5\"}", + "path": "canary-one/Exports/Output{\"Ref\":\"InlineAsset5EAEB9B5\"}", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Output{\"Ref\":\"DirectoryAssetB49EFE5C\"}": { + "id": "Output{\"Ref\":\"DirectoryAssetB49EFE5C\"}", + "path": "canary-one/Exports/Output{\"Ref\":\"DirectoryAssetB49EFE5C\"}", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Output{\"Ref\":\"ZipAssetA028C65F\"}": { + "id": "Output{\"Ref\":\"ZipAssetA028C65F\"}", + "path": "canary-one/Exports/Output{\"Ref\":\"ZipAssetA028C65F\"}", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Output{\"Ref\":\"SynNodejsPuppeteer3978815E0A\"}": { + "id": "Output{\"Ref\":\"SynNodejsPuppeteer3978815E0A\"}", + "path": "canary-one/Exports/Output{\"Ref\":\"SynNodejsPuppeteer3978815E0A\"}", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Output{\"Ref\":\"SynNodejsPuppeteer406C46FFAF\"}": { + "id": "Output{\"Ref\":\"SynNodejsPuppeteer406C46FFAF\"}", + "path": "canary-one/Exports/Output{\"Ref\":\"SynNodejsPuppeteer406C46FFAF\"}", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Output{\"Ref\":\"SynPythonSelenium13F92D8275\"}": { + "id": "Output{\"Ref\":\"SynPythonSelenium13F92D8275\"}", + "path": "canary-one/Exports/Output{\"Ref\":\"SynPythonSelenium13F92D8275\"}", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "canary-one/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "canary-one/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "IntegCanaryTest": { + "id": "IntegCanaryTest", + "path": "IntegCanaryTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "IntegCanaryTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "IntegCanaryTest/DefaultTest/DeployAssert", "children": { - "Resource": { - "id": "Resource", - "path": "canary-one/MyPythonCanary/ArtifactsBucket/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::S3::Bucket", - "aws:cdk:cloudformation:props": { - "bucketEncryption": { - "serverSideEncryptionConfiguration": [ - { - "serverSideEncryptionByDefault": { - "sseAlgorithm": "aws:kms" + "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46": { + "id": "AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" } - ] + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/WaitFor/Resource", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.WaiterStateMachine", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns10023df2885f280da73de72d07b27d46/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", + "fqn": "@aws-cdk/integ-tests-alpha.AwsApiCall", "version": "0.0.0" } }, - "Policy": { - "id": "Policy", - "path": "canary-one/MyPythonCanary/ArtifactsBucket/Policy", + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", "children": { - "Resource": { - "id": "Resource", - "path": "canary-one/MyPythonCanary/ArtifactsBucket/Policy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", - "aws:cdk:cloudformation:props": { - "bucket": { - "Ref": "MyPythonCanaryArtifactsBucket7AE88133" + "Staging": { + "id": "Staging", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Handler": { + "id": "Handler", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "SingletonFunction76b3e830a873425f8453eddd85c86925": { + "id": "SingletonFunction76b3e830a873425f8453eddd85c86925", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925", + "children": { + "Staging": { + "id": "Staging", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Staging", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Handler": { + "id": "Handler", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Handler", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { + "id": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a", + "children": { + "Staging": { + "id": "Staging", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Staging", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Handler": { + "id": "Handler", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Handler", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792": { + "id": "AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } }, - "policyDocument": { - "Statement": [ - { - "Action": "s3:*", - "Condition": { - "Bool": { - "aws:SecureTransport": "false" - } - }, - "Effect": "Deny", - "Principal": { - "AWS": "*" - }, - "Resource": [ - { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - }, - "/*" - ] - ] - } - ] + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } - ], - "Version": "2012-10-17" + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/WaitFor/Resource", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "fqn": "@aws-cdk/integ-tests-alpha.WaiterStateMachine", "version": "0.0.0" } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns588dd7080086c213b18ceae14d834792/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } } }, "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/MyPythonCanary/ServiceRole", - "children": { - "ImportServiceRole": { - "id": "ImportServiceRole", - "path": "canary-one/MyPythonCanary/ServiceRole/ImportServiceRole", - "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "@aws-cdk/integ-tests-alpha.AwsApiCall", "version": "0.0.0" } }, - "Resource": { - "id": "Resource", - "path": "canary-one/MyPythonCanary/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" - } + "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe": { + "id": "AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } - ], - "Version": "2012-10-17" + } }, - "policies": [ - { - "policyName": "canaryPolicy", - "policyDocument": { - "Statement": [ - { - "Action": "s3:ListAllMyBuckets", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "s3:GetBucketLocation", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "Arn" - ] - } - }, - { - "Action": "s3:PutObject", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "MyPythonCanaryArtifactsBucket7AE88133", - "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-*" - ] - ] - } + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } - ], - "Version": "2012-10-17" + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/WaitFor/Resource", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" } } - ] + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.WaiterStateMachine", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunsaf0432d0aeabb461c9a56a62dba7b6fe/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", + "fqn": "@aws-cdk/integ-tests-alpha.AwsApiCall", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", - "version": "0.0.0" - } - }, - "Code": { - "id": "Code", - "path": "canary-one/MyPythonCanary/Code", - "children": { - "Stage": { - "id": "Stage", - "path": "canary-one/MyPythonCanary/Code/Stage", + }, + "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae": { + "id": "AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/WaitFor/Resource", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.WaiterStateMachine", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRuns2cca2de7ae72f8b5fe89f0c7e484d5ae/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", + "fqn": "@aws-cdk/integ-tests-alpha.AwsApiCall", "version": "0.0.0" } }, - "AssetBucket": { - "id": "AssetBucket", - "path": "canary-one/MyPythonCanary/Code/AssetBucket", + "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60": { + "id": "AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/WaitFor/Resource", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.WaiterStateMachine", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse77bc009769f8becf2bba8ec443d0a60/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.BucketBase", + "fqn": "@aws-cdk/integ-tests-alpha.AwsApiCall", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-s3-assets.Asset", - "version": "0.0.0" - } - }, - "Resource": { - "id": "Resource", - "path": "canary-one/MyPythonCanary/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::Synthetics::Canary", - "aws:cdk:cloudformation:props": { - "artifactS3Location": { - "Fn::Join": [ - "", - [ - "s3://", - { - "Ref": "MyPythonCanaryArtifactsBucket7AE88133" + }, + "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2": { + "id": "AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } } - ] - ] - }, - "code": { - "handler": "canary.handler", - "s3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } }, - "s3Key": "9d00e437db1f5f8788ce938a3f00a9a1b946820e78c9b4c36207c8475db882bb.zip" - }, - "executionRoleArn": { - "Fn::GetAtt": [ - "MyPythonCanaryServiceRole41A363E1", - "Arn" - ] - }, - "name": "py-canary-integ", - "runtimeVersion": "syn-python-selenium-1.3", - "schedule": { - "durationInSeconds": "0", - "expression": "rate(5 minutes)" + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/WaitFor/Resource", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.WaiterStateMachine", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/AwsApiCallSyntheticsgetCanaryRunse7a1e913bca172f26683b6f1e3a239e2/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + } }, - "startCanaryAfterCreation": true + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.AwsApiCall", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "IntegCanaryTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.9" + } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.CfnCanary", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-synthetics.Canary", - "version": "0.0.0" - } - }, - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "canary-one/BootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "canary-one/CheckBootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", "version": "0.0.0" } }, @@ -2040,13 +3143,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.228" + "version": "10.2.9" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.2.9" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.ts b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.ts index 9ebf0828124e0..bedce14d157af 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.ts +++ b/packages/@aws-cdk/aws-synthetics-alpha/test/integ.canary.ts @@ -1,92 +1,102 @@ /// !cdk-integ canary-one import * as path from 'path'; +import * as apigateway from 'aws-cdk-lib/aws-apigateway'; import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; -import * as synthetics from '../lib'; +import { Canary, Code, Runtime, Schedule, Test } from '../lib'; +import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha'; +import { RemovalPolicy } from 'aws-cdk-lib'; -/* - * Stack verification steps: - * - * -- aws synthetics get-canary --name canary-integ has a state of 'RUNNING' - * -- 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'); -const bucket = new s3.Bucket(stack, 'mytestbucket'); +const bucket = new s3.Bucket(stack, 'MyTestBucket', { + removalPolicy: RemovalPolicy.DESTROY, + autoDeleteObjects: true, +}); const prefix = 'integ'; -new synthetics.Canary(stack, 'MyCanary', { - canaryName: 'canary-integ', - test: synthetics.Test.custom({ +const api = new apigateway.RestApi(stack, 'ApiGateway'); +api.root.addMethod('GET', new apigateway.MockIntegration({ + integrationResponses: [{ + statusCode: '200', + }], + passthroughBehavior: apigateway.PassthroughBehavior.NEVER, + requestTemplates: { + 'application/json': '{ "statusCode": 200 }', + }, +}), { + methodResponses: [{ statusCode: '200' }], +}); + +const inlineAsset = new Canary(stack, 'InlineAsset', { + test: Test.custom({ handler: 'index.handler', - code: synthetics.Code.fromInline(` + code: Code.fromInline(` exports.handler = async () => { console.log(\'hello world\'); };`), }), - schedule: synthetics.Schedule.rate(cdk.Duration.minutes(1)), + schedule: Schedule.rate(cdk.Duration.minutes(1)), artifactsBucketLocation: { bucket, prefix }, - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9, + runtime: Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, }); -new synthetics.Canary(stack, 'MyCanaryOne', { - canaryName: 'assetcanary-one', - test: synthetics.Test.custom({ +const directoryAsset = new Canary(stack, 'DirectoryAsset', { + test: Test.custom({ handler: 'canary.handler', - code: synthetics.Code.fromAsset(path.join(__dirname, 'canaries')), + code: Code.fromAsset(path.join(__dirname, 'canaries')), }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9, + runtime: Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, + environmentVariables: { + URL: api.url, + }, enableAutoDeleteLambdas: true, }); -new synthetics.Canary(stack, 'MyCanaryTwo', { - canaryName: 'assetcanary-two', - test: synthetics.Test.custom({ +const zipAsset = new Canary(stack, 'ZipAsset', { + test: Test.custom({ handler: 'canary.handler', - code: synthetics.Code.fromAsset(path.join(__dirname, 'canary.zip')), + code: Code.fromAsset(path.join(__dirname, 'canary.zip')), }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9, + runtime: Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0, }); -new synthetics.Canary(stack, 'MyCanaryThree', { - canaryName: 'assetcanary-three', - test: synthetics.Test.custom({ - handler: 'canary.handler', - code: synthetics.Code.fromAsset(path.join(__dirname, 'canary.zip')), - }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9, -}); +const kebabToPascal = (text :string )=> text.replace(/(^\w|-\w)/g, (v) => v.replace(/-/, '').toUpperCase()); +const createCanaryByRuntimes = (runtime: Runtime) => + new Canary(stack, kebabToPascal(runtime.name).replace('.', ''), { + test: Test.custom({ + handler: 'canary.handler', + code: Code.fromAsset(path.join(__dirname, 'canaries')), + }), + environmentVariables: { + URL: api.url, + }, + runtime, + }); -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_9, -}); +const puppeteer39 = createCanaryByRuntimes(Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9); +const puppeteer40 = createCanaryByRuntimes(Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0); +const selenium13 = createCanaryByRuntimes(Runtime.SYNTHETICS_PYTHON_SELENIUM_1_3); -new synthetics.Canary(stack, 'MyCanaryRuntime38', { - canaryName: 'assetcanary-five', - test: synthetics.Test.custom({ - handler: 'canary.handler', - code: synthetics.Code.fromAsset(path.join(__dirname, 'canary.zip')), - }), - runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9, +const test = new IntegTest(app, 'IntegCanaryTest', { + testCases: [stack], }); -new synthetics.Canary(stack, 'MyPythonCanary', { - canaryName: 'py-canary-integ', - test: synthetics.Test.custom({ - handler: 'canary.handler', - code: synthetics.Code.fromAsset(path.join(__dirname, 'canaries')), - }), - runtime: synthetics.Runtime.SYNTHETICS_PYTHON_SELENIUM_1_3, -}); +// Assertion that all Canary's are Passed +[ + inlineAsset, + directoryAsset, + zipAsset, + puppeteer39, + puppeteer40, + selenium13, +].forEach((canary) => test.assertions + .awsApiCall('Synthetics', 'getCanaryRuns', { + Name: canary.canaryName, + }) + .assertAtPath('CanaryRuns.0.Status.State', ExpectedResult.stringLikeRegexp('PASSED')) + .waitForAssertions({ totalTimeout: cdk.Duration.minutes(5) })); app.synth();