Skip to content

[synthetics] support runConfig properties #9300

@kaizencc

Description

@kaizencc

Issue

AWS Synthetics Canary has an optional runConfig property that is currently not supported by the Canary L2. This property exposes timeoutInSeconds and memoryInMb.

The difficulty is that timeoutInSeconds is required if runConfig is set, so one cannot only specify memoryInMb.

This does not seem like it should be a hard requirement (i.e. one should be able to set memoryInMb without timeout).

The requirements for timeoutInSeconds are that it is inside the range 3 - 840 seconds* and not greater than the amount specified in the schedule expression.

 

* yes, this is different than specified in the docs but I tried to set it to be 900 seconds and received the error "Invalid request provided: Run timeout cannot be less than 3 seconds or greater than 840 seconds"

Use Case

The use case for this property is unclear so this issue serves as a platform for discussion on whether it is needed and how to implement.

While the proposed solution is possible, this seems like extra work if the runConfig property is largely ignored anyway. And if timeoutInSeconds becomes optional, then we no longer need to find a default for the property.

Proposed Solution

Add separate optional properties timeout: cdk.Duration and memorySize: cdk.Size to CanaryProps.

timeout should default to the minimum of 840 seconds and the amount in expression. This would require parsing through the expression string to extract the number/unit and convert to seconds.

memorySize is optional in runConfig, so no need to default and it is up to the user to specify a valid amount of memory.

  • 👋 I may be able to implement this feature request

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-syntheticsRelated to Amazon CloudWatch Syntheticseffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions