aws / aws/aws-cdk

aws-bedrockagentcore: Annotations are not acknowledgeable on Runtime

Open Beginner friendly
#38,741 2 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-bedrock-agentcore-alpha bug effort/small p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

Bedrock AgentCore library is still using old `Annotations.addWarning()` and `Annotations.addInfo()` in the `Runtime` class, which makes these annotations not acknowledgeable.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Library Version

2.267.0

### Expected Behavior

Annotation should be acknowledgeable.

### Current Behavior

Annotation are not acknowledgeable.

### Reproduction Steps

```py
# INFO Container URI validation skipped as it contains unresolved CDK tokens. The URI will be validated at deployment time. (Construct Annotations)
# Agents/Foo
# Acknowledge with 'Construct-Annotations::info-annotation'
runtime = agentcore.Runtime(stack, "Foo",
runtime_name = "foo",
agent_runtime_artifact = agentcore.AgentRuntimeArtifact.from_ecr_repository(
repository = ecr.Repository(stack, "Repository",
repository_name = "bar",
),
tag = "latest"
)
)
Annotations.of(runtime).acknowledge_info(
id = "Construct-Annotations::info-annotation", # Won't work as the annotation do not have any id
message = "Ignore container URI validation"
)
```

### Possible Solution

Move to `Annotations.addWarningV2()` and `Annotations.addInfoV2()`.
I could probably do the fix if there is some documentation on conventions for message ids somewhere.

### Additional Information/Context

_No response_

### AWS CDK Library version (aws-cdk-lib)

-

### AWS CDK CLI version

2.1139.0 (build d51353e)

### Node.js Version

v24.15.0

### OS

macOS 26.6.2

### Language

Python

### Language Version

Python (3.14.7)

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the Bedrock AgentCore Runtime class and its uses of Annotations.addWarning() and Annotations.addInfo(); then inspect nearby addWarningV2()/addInfoV2() usage for message-ID conventions. Update the Runtime annotations so the documented Construct-Annotations::info-annotation acknowledgment works, and run the relevant AgentCore tests or validation suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.