Skip to content

synthetics: cdk requires handler to end in .handler when synthetics do not #26540

@kaizencc

Description

@kaizencc

Describe the bug

From the docs:

The entry point to use for the source code when running the canary. For canaries that use the syn-python-selenium-1.0 runtime or a syn-nodejs.puppeteer runtime earlier than syn-nodejs.puppeteer-3.4, the handler must be specified as fileName.handler. For syn-python-selenium-1.1, syn-nodejs.puppeteer-3.4, and later runtimes, the handler can be specified as fileName.functionName , or you can specify a folder where canary scripts reside as folder/fileName.functionName .

Currently CDK enforces that the handler is named filename.handler for all runtimes, which is too strict.

Expected Behavior

CDK enforces what Synthetics enforces

Current Behavior

CDK enforces legacy rules.

Reproduction Steps

n/a

Possible Solution

Removing the synth-time check that enforces this rule.

Additional Information/Context

No response

CDK CLI Version

latest

Framework Version

No response

Node.js Version

latest

OS

latest

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-syntheticsRelated to Amazon CloudWatch SyntheticsbugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions