(aws-bedrock-agentcore-alpha): OnlineEvaluationConfig documents executionStatus default of ENABLED but applies none - config is created DISABLED
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?.valueOmitting 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:
(Preferred) Apply the documented default in the L2 — emit
ExecutionStatus.ENABLEDwhenexecutionStatusis omitted. Matches the JSDoc and is the safer default for a monitoring feature.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.
Use
aws-cdk-lib2.265.0 (also present on latest — please confirm on current when filing).Create an
OnlineEvaluationConfigwithoutexecutionStatus.Run
cdk synth.Inspect the
AWS::BedrockAgentCore::OnlineEvaluationConfigresource —ExecutionStatusis 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).valueFailing 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 inonline-evaluation.js, and the absentExecutionStatusCloudFormation property.Inferred (from the console, not yet from an API response): that the effective service default is
DISABLED. Theget-online-evaluation-configcall above nails this down.
Source: aws/aws-cdk