-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 setting environment variables during canary creation #10515
Comments
It does not seem like it is possible to configure the environment variable using Canary CloudFormation resource. When creating a Canary the synthetics service creates a lambda function on your behalf, the lambda resource itself is not created via CloudFormation, so if the Canary resource does not expose these properties on its API there is no (easy) way to change them using the resource. |
thanks for the reply. I should have opened this as a feature request to the cloudformation canary resource rather than the cdk. |
thanks for keeping me in the loop and constantly improving the developer experience. |
adding an env var looks like this: const cfnCanary = canary.node.defaultChild as synthetics.CfnCanary
cfnCanary.addPropertyOverride('RunConfig.EnvironmentVariables', {
API_URL: "someurl"
}) |
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*
|
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*
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*
Support setting environment variables during canary creation
Use Case
Since the canary is wrapped by a lambda, we should be able to create env variables that are available during the lambda execution so we can pass additional runtime information during test runs.
Proposed Solution
Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: