Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
badmintoncryer committed Jan 10, 2025
1 parent d99e091 commit 33c557d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-synthetics/lib/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ export class AssetCode extends Code {
if (family === RuntimeFamily.NODEJS && runtimeName.includes('puppeteer') && !fs.existsSync(path.join(assetPath, 'nodejs', 'node_modules', nodeFilename))) {
throw new Error(`The canary resource requires that the handler is present at "nodejs/node_modules/${nodeFilename}" but not found at ${this.assetPath} (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary_Nodejs.html)`);
}
// Requires the canary handler file to have the extension '.js', '.mjs', or '.cjs' for playwright runtime.
// Requires the canary handler file to have the extension '.js', '.mjs', or '.cjs' for the playwright runtime.
if (family === RuntimeFamily.NODEJS && runtimeName.includes('playwright') && !hasValidExtension) {
throw new Error(`The canary resource requires that the handler is present at one of the following extensions: ${playwrightValidExtensions.join(', ')} but not found at ${this.assetPath}`);
}
}
// Requires asset directory to have the structure 'python/{canary-handler-name}.py' for Python runtime.
// Requires the asset directory to have the structure 'python/{canary-handler-name}.py' for the Python runtime.
if (family === RuntimeFamily.PYTHON && !fs.existsSync(path.join(assetPath, 'python', pythonFilename))) {
throw new Error(`The canary resource requires that the handler is present at "python/${pythonFilename}" but not found at ${this.assetPath} (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary_Python.html)`);
}
Expand Down

0 comments on commit 33c557d

Please sign in to comment.