Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[synthetics] support runConfig properties #9300

Closed
1 task done
Labels
@aws-cdk/aws-synthetics Related to Amazon CloudWatch Synthetics effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@kaizencc
Copy link
Contributor

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

@kaizencc kaizencc added feature-request A feature should be added or improved. @aws-cdk/aws-synthetics Related to Amazon CloudWatch Synthetics labels Jul 28, 2020
@kaizencc kaizencc self-assigned this Jul 28, 2020
@NetaNir NetaNir added the effort/medium Medium work item – several days of effort label Jul 28, 2020
@NetaNir NetaNir added the p2 label Aug 26, 2020
@NetaNir
Copy link
Contributor

NetaNir commented Apr 30, 2021

We are unassigning and marking this issue as p2, which means that we are unable to work on this immediately.
We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

@marius-jakobi
Copy link

environmentVariables would also be useful on Canary construct 👍

@ArendAMZN
Copy link

+1, our team would like to use this for environment variables

Also we want our canaries to run every minute, this is supported in cfncanary, but not in synthetics.canary

We added the cfncanary work around, but it's making it hard to extend our cdk from there. For example, adding alarms is much easier using synthetics.canary as opposed to cfncanary

@laksandy
Copy link

+1, our team would like to use this for environment variables

mergify bot pushed a commit that referenced this issue Jun 16, 2021
Add support for canary environment variables that will be threaded to the underlying Lambda function. This allows multiple canaries to use the same source code by extracting configuration to the resource specification.

Also makes the README snippets compile since it was hard to tell whether my changes were correct.

closes #10515
refer #9300

Co-authored-by: Florian Chazal <[email protected]>

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
matthewsvu pushed a commit to matthewsvu/aws-cdk that referenced this issue Jun 22, 2021
Add support for canary environment variables that will be threaded to the underlying Lambda function. This allows multiple canaries to use the same source code by extracting configuration to the resource specification.

Also makes the README snippets compile since it was hard to tell whether my changes were correct.

closes aws#10515
refer aws#9300

Co-authored-by: Florian Chazal <[email protected]>

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
Add support for canary environment variables that will be threaded to the underlying Lambda function. This allows multiple canaries to use the same source code by extracting configuration to the resource specification.

Also makes the README snippets compile since it was hard to tell whether my changes were correct.

closes aws#10515
refer aws#9300

Co-authored-by: Florian Chazal <[email protected]>

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@mergify mergify bot closed this as completed in #30556 Jul 31, 2024
@mergify mergify bot closed this as completed in 9295a85 Jul 31, 2024
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.