code

construct an aws.sdk.kotlin.services.synthetics.model.CanaryCodeInput inside the given block


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 Zipfile.

If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your script in a certain folder structure.

  • For Node.js canaries, the folder structure must be nodejs/node_modules/<i>myCanaryFilename.js</i> For more information, see Packaging your Node.js canary files

  • For Python canaries, the folder structure must be python/<i>myCanaryFilename.py</i> or python/<i>myFolder/myCanaryFilename.py</i> For more information, see Packaging your Python canary files