Skip to content

Commit 6931127

Browse files
author
AWS
committed
Synthetics Update: This feature allows AWS Synthetics customers to provide code dependencies using lambda layer while creating a canary
1 parent 838d13a commit 6931127

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Synthetics",
4+
"contributor": "",
5+
"description": "This feature allows AWS Synthetics customers to provide code dependencies using lambda layer while creating a canary"
6+
}

services/synthetics/src/main/resources/codegen-resources/service-2.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,10 @@
568568
"Handler":{
569569
"shape":"CodeHandler",
570570
"documentation":"<p>The entry point to use for the source code when running the canary. For canaries that use the <code>syn-python-selenium-1.0</code> runtime or a <code>syn-nodejs.puppeteer</code> runtime earlier than <code>syn-nodejs.puppeteer-3.4</code>, the handler must be specified as <code> <i>fileName</i>.handler</code>. For <code>syn-python-selenium-1.1</code>, <code>syn-nodejs.puppeteer-3.4</code>, and later runtimes, the handler can be specified as <code> <i>fileName</i>.<i>functionName</i> </code>, or you can specify a folder where canary scripts reside as <code> <i>folder</i>/<i>fileName</i>.<i>functionName</i> </code>.</p>"
571+
},
572+
"Dependencies":{
573+
"shape":"Dependencies",
574+
"documentation":"<p>A list of dependencies that should be used for running this canary. Specify the dependencies as a key-value pair, where the key is the type of dependency and the value is the dependency reference.</p>"
571575
}
572576
},
573577
"documentation":"<p>Use this structure to input your script code for the canary. This structure contains the Lambda handler with the location where the canary should start running the script. If the script is stored in an Amazon S3 bucket, the bucket name, key, and version are also included. If the script was passed into the canary directly, the script code is contained in the value of <code>Zipfile</code>. </p> <p>If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your script in a certain folder structure.</p> <ul> <li> <p>For Node.js canaries, the folder structure must be <code>nodejs/node_modules/<i>myCanaryFilename.js</i> </code> For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary_Nodejs.html#CloudWatch_Synthetics_Canaries_package\">Packaging your Node.js canary files</a> </p> </li> <li> <p>For Python canaries, the folder structure must be <code>python/<i>myCanaryFilename.py</i> </code> or <code>python/<i>myFolder/myCanaryFilename.py</i> </code> For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary_Python.html#CloudWatch_Synthetics_Canaries_WritingCanary_Python_package\">Packaging your Python canary files</a> </p> </li> </ul>"
@@ -582,6 +586,10 @@
582586
"Handler":{
583587
"shape":"String",
584588
"documentation":"<p>The entry point to use for the source code when running the canary.</p>"
589+
},
590+
"Dependencies":{
591+
"shape":"Dependencies",
592+
"documentation":"<p>A list of dependencies that are used for running this canary. The dependencies are specified as a key-value pair, where the key is the type of dependency and the value is the dependency reference.</p>"
585593
}
586594
},
587595
"documentation":"<p>This structure contains information about the canary's Lambda handler and where its code is stored by CloudWatch Synthetics.</p>"
@@ -1031,6 +1039,31 @@
10311039
"type":"structure",
10321040
"members":{}
10331041
},
1042+
"Dependencies":{
1043+
"type":"list",
1044+
"member":{"shape":"Dependency"},
1045+
"max":1,
1046+
"min":0
1047+
},
1048+
"Dependency":{
1049+
"type":"structure",
1050+
"required":["Reference"],
1051+
"members":{
1052+
"Type":{
1053+
"shape":"DependencyType",
1054+
"documentation":"<p>The type of dependency. Valid value is <code>LambdaLayer</code>.</p>"
1055+
},
1056+
"Reference":{
1057+
"shape":"String",
1058+
"documentation":"<p>The dependency reference. For Lambda layers, this is the ARN of the Lambda layer. For more information about Lambda ARN format, see <a href=\"https://docs.aws.amazon.com/lambda/latest/api/API_Layer.html\">Lambda</a>.</p>"
1059+
}
1060+
},
1061+
"documentation":"<p>A structure that contains information about a dependency for a canary.</p>"
1062+
},
1063+
"DependencyType":{
1064+
"type":"string",
1065+
"enum":["LambdaLayer"]
1066+
},
10341067
"DescribeCanariesLastRunNameFilter":{
10351068
"type":"list",
10361069
"member":{"shape":"CanaryName"},

0 commit comments

Comments
 (0)