(aws-bedrock-agentcore-alpha): OnlineEvaluationConfig documents executionStatus default of ENABLED but applies none - config is created DISABLED

Open Beginner friendly
#38,845 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
aws, typescript

Research direction

Start in the aws-bedrock-agentcore implementation at online-evaluation.js and inspect the executionStatus property alongside the OnlineEvaluationBaseProps JSDoc. Reproduce the issue by synthesizing an OnlineEvaluationConfig without executionStatus, then verify that the generated AWS::BedrockAgentCore::OnlineEvaluationConfig includes the documented ENABLED value. Done means the runtime behavior and @default documentation agree.

Written by the indexing model from the issue text.

Description

@aws-cdk/aws-bedrock-agentcore-alpha bug needs-triage
Describe the bug

OnlineEvaluationBaseProps.executionStatus is documented as defaulting to ExecutionStatus.ENABLED:

/**
 * The execution status of the online evaluation configuration.
 * Controls whether the evaluation actively processes agent traces.
 * @default ExecutionStatus.ENABLED
 */
readonly executionStatus?: ExecutionStatus;

The implementation applies no default. From online-evaluation.js:

executionStatus: props.executionStatus?.value

Omitting the property therefore emits no ExecutionStatus at all into the synthesised template, and the service's own default applies. Because the JSDoc promises ENABLED but the resource is created disabled, an online evaluation set up with default props silently never processes a trace.

This is the same class of defect as #36376 (Runtime defaults idleRuntimeSessionTimeout to a non-documented value): a construct default that does not match its own documentation.

Regression Issue
  • Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version

No response

Expected Behavior

Either behaviour is defensible, but the JSDoc and the runtime behaviour must agree:

  1. (Preferred) Apply the documented default in the L2 — emit ExecutionStatus.ENABLED when executionStatus is omitted. Matches the JSDoc and is the safer default for a monitoring feature.

  2. Or correct the JSDoc to state that the service decides the default and that the effective default is disabled.

Current Behavior

Omitting executionStatus emits no ExecutionStatus property. The configuration is created disabled: CloudFormation reports CREATE_COMPLETE, the resource exists, and the console shows Disabled. No trace is ever evaluated, and the failure is silent — an evaluation that never ran is indistinguishable from one that ran and found nothing.

Synthesised resource properties when executionStatus is omitted:

properties present: ['DataSourceConfig', 'Description',
  'EvaluationExecutionRoleArn', 'Evaluators', 'OnlineEvaluationConfigName',
  'Rule', 'Tags']

(ExecutionStatus absent.)

Reproduction Steps

Synth-only; no deployment required.

  1. Use aws-cdk-lib 2.265.0 (also present on latest — please confirm on current when filing).

  2. Create an OnlineEvaluationConfig without executionStatus.

  3. Run cdk synth.

  4. Inspect the AWS::BedrockAgentCore::OnlineEvaluationConfig resource — ExecutionStatus is absent from its properties.

To confirm the resulting service-side state, deploy without the property and call:

aws bedrock-agentcore-control get-online-evaluation-config --online-evaluation-config-id <id>
Possible Solution

In the L2, apply the documented default when the property is omitted:

executionStatus: (props.executionStatus ?? agentcore.ExecutionStatus.ENABLED).value

Failing that, correct the @default JSDoc on executionStatus to reflect that the service default (disabled) applies.

Additional Information/Context
  • AWS's create-online-evaluation documentation describes the parameter controlling whether evaluation begins as required, so the L2 omitting it leaves the outcome to a service default. (Rephrased to avoid quoting docs verbatim.)

  • Related construct-default mismatch: #36376.

AWS CDK Library version (aws-cdk-lib)

2.265.0

AWS CDK CLI version

2.1136.0

Node.js Version

v22.12.0

OS

MacOS 26.6.2

Language

TypeScript

Language Version

TypeScript 5.9.3

Other information
  • Verified from source and synth output: the JSDoc @default ENABLED, the missing default in online-evaluation.js, and the absent ExecutionStatus CloudFormation property.

  • Inferred (from the console, not yet from an API response): that the effective service default is DISABLED. The get-online-evaluation-config call above nails this down.

Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
71

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/aws-cdk

All issues in aws/aws-cdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.