fix(sdk): default Workflow Insight example auto-invoke schedule to off#721
Merged
Conversation
The example/demo CDK stack (packages/aws-durable-execution-sdk-js-insight/cdk) defaulted lambda.autoInvoke.enabled to true, which provisions a dispatcher Lambda + an EventBridge rule that re-invokes the example durable function every few minutes. That keeps generating billable Lambda invocations (and downstream destination writes) indefinitely until the stack is torn down — an easy way to incur cost without realizing it. - Flip lambda.autoInvoke.enabled to false so auto-invocation is strictly opt-in. Deploying the example function itself stays on (it's free at rest); only the recurring scheduled invocation is now off by default. - Document the cost rationale in the config so it's clear before enabling. Also makes cdk/config.json self-documenting: JSON has no comments, so following the file's existing `_comment` convention, every field now has a sibling `<field>Comment` description (plus a per-section `_comment`), and the top-level `_comment` notes that auto-invoke is off by default. These keys are ignored by the CDK code, which reads config values by explicit key (no key enumeration), so behavior is unchanged and the stack still typechecks. Adds a stack test asserting no EventBridge rule is synthesized with the default config. CDK typecheck + stack tests (11) pass.
ParidelPooya
marked this pull request as ready for review
July 15, 2026 17:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The example/demo CDK stack (packages/aws-durable-execution-sdk-js-insight/cdk) defaulted lambda.autoInvoke.enabled to true, which provisions a dispatcher Lambda + an EventBridge rule that re-invokes the example durable function every few minutes. That keeps generating billable Lambda invocations (and downstream destination writes) indefinitely until the stack is torn down — an easy way to incur cost without realizing it.
Also makes cdk/config.json self-documenting: JSON has no comments, so following the file's existing
_commentconvention, every field now has a sibling<field>Commentdescription (plus a per-section_comment), and the top-level_commentnotes that auto-invoke is off by default. These keys are ignored by the CDK code, which reads config values by explicit key (no key enumeration), so behavior is unchanged and the stack still typechecks.Adds a stack test asserting no EventBridge rule is synthesized with the default config. CDK typecheck + stack tests (11) pass.