aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

F3006 false positive: AWS::BedrockAgentCore::Runtime reported as "does not exist in cn-north-1" (stale regional availability data; persists on latest validator 1.12.1)

Open zhaojiew10 opened this issue 4 weeks ago • 3 comments

Describe the issue

Summary

The offline validator @aws/cloudformation-validate (bundled in aws-cdk-lib, surfaced during cdk synth / agentcore deploy) emits warning F3006 claiming AWS::BedrockAgentCore::Runtime does not exist in cn-north-1. This is a false positive — the resource type is registered and LIVE in that region. The embedded regional availability dataset for the China (Beijing / aws-cn) partition appears to be stale.

Warning emitted

WARNING Type: Resource type 'AWS::BedrockAgentCore::Runtime' does not exist in 'cn-north-1' (CloudFormation Validate) Acknowledge with 'CloudFormation-Validate::F3006' From the generated cdk.out/validation-report.json:

  • pluginName: "CloudFormation Validate"
  • ruleName: "F3006", category: "Schema", severity: "warning"
  • constructFqn: aws-cdk-lib.aws_bedrockagentcore.CfnRuntime

Environment

  • Region: cn-north-1 (aws-cn partition)
  • @aws/agentcore (CLI): 1.0.1
  • aws-cdk-lib: 2.269.0 (ALSO reproduced on 2.275.0)
  • @aws/cloudformation-validate: 1.9.0-beta (ALSO reproduced on 1.12.1)

Evidence it is a false positive

describe-type in cn-north-1 shows the type is PUBLIC and LIVE:

aws cloudformation describe-type --type RESOURCE \
  --type-name "AWS::BedrockAgentCore::Runtime" --region cn-north-1

Returns:

  • Arn: arn:aws-cn:cloudformation:cn-north-1::type/resource/AWS-BedrockAgentCore-Runtime
  • Visibility: PUBLIC
  • DeprecatedStatus: LIVE

Deployment also succeeds end-to-end with this warning present; the runtime is created and invokable (invoke-agent-runtime returns statusCode 200). Other AgentCore types (Gateway, BrowserCustom, CodeInterpreterCustom) are also registered in cn-north-1.

Upgrade does NOT fix it (and breaks deploy)

  • Upgrading aws-cdk-lib 2.269.0 -> 2.275.0 bumps the bundled validator to 1.12.1, but F3006 is still emitted (identical message).
  • Additionally, 2.275.0 produces cloud assembly schema 55.0.0, which the CDK CLI pinned by @aws/agentcore cannot read (max supported 54.x.x; requires CLI >= 2.1147.0), causing cdk synth to fail. So upgrading is not a viable workaround.

Expected

F3006 should not fire for AWS::BedrockAgentCore::Runtime in cn-north-1 (and likely cn-northwest-1). The embedded regional availability dataset should include AgentCore resource types for the aws-cn partition.

Impact

Misleading warning during agentcore deploy / cdk synth in China regions, implying the resource is unsupported when it is not. Confuses users into thinking their CDK version is outdated.

Links

https://docs.amazonaws.cn/en_us/bedrock-agentcore/latest/devguide/agentcore-get-started-cli.html

zhaojiew10 avatar Nov 05 '26 09:11 zhaojiew10

Hi @zhaojiew10,

I reproduced the warning on aws-cdk-lib 2.269.0. It bundles @aws/cloudformation-validate 1.9.0-beta. Its region data has no AWS::BedrockAgentCore::Runtime entry for cn-north-1, so the validator reports F3006 on the cn-north-1 stack only.

I grepped the region_resource_types.json file from each validator version. The command searches the "cn-north-1" block for AWS::BedrockAgentCore::Runtime:

$ awk '/^ {4}"cn-north-1": \{/ {f=1; print "line "NR": "$0; next} f && /^ {4}"[a-z]/ {f=0} f && /AWS::BedrockAgentCore::Runtime"/ {print "line "NR": "$0}' region_resource_types.json

Version 1.12.1 (2d895cb5, bundled by aws-cdk-lib 2.271.0 and later):

line 19444:     "cn-north-1": {
line 19552:       "AWS::BedrockAgentCore::Runtime": true,

Version 1.9.0-beta (ead07959, bundled by 2.269.0 and 2.270.0): the same search counts 0 matches in the cn-north-1 block.

I could not reproduce the warning on 2.275.0. A clean install of 2.275.0 showed no F3006 for the same stack. To find out why your 2.275.0 run still warns, could you share:

  1. The output of npm ls --all @aws/cloudformation-validate from the project where you see the warning.
  2. Your lockfile entry or any overrides for @aws/cloudformation-validate, if you have one.
  3. The env of the stack that shows the warning, and whether it sets a region.
  4. A minimal app that reproduces the warning, if you can share one.
  5. The exact @agentcore CLI 1.0.1 error for the cloud assembly schema 55.0.0, with the command you ran.

Thanks!

pahud avatar Nov 05 '26 20:11 pahud

Hi @pahud, You're absolutely right, and I apologize for the incorrect analysis in my earlier report. Thank you for taking the time to reproduce this carefully!

I re-verified everything with clean installs and confirm your findings:

  • 2.269.0 / 2.270.0 bundle @aws/[email protected], whose region data has no AWS::BedrockAgentCore::Runtime entry for cn-north-1.
  • 2.271.0 and later bundle 1.12.1, whose region data does include that entry .

My earlier claim was wrong. The root cause was that I upgraded aws-cdk-lib incrementally on top of an existing node_modules, so the nested old validator (1.9.0-beta wasm) was never replaced. After a clean reinstall (removing node_modules + lockfile), 2.275.0 shows no F3006.

Since upgrading aws-cdk-lib to ≥ 2.271.0 resolves F3006, I'll go ahead and close this issue. Thanks a lot!

zhaojiew10 avatar Nov 06 '26 11:11 zhaojiew10

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[bot] avatar Nov 06 '26 11:11 github-actions[bot]