Skip to content

BedrockAgentCoreClient full ARN in memoryId parameter, causing silent memory extraction failure #7036

@ashley-taylor

Description

@ashley-taylor

Describe the bug

When a full ARN is passed as memoryId to BedrockAgentCoreClient.createEvent() (and listMemoryRecords(), retrieveMemoryRecords()). The API returns HTTP 201 with a valid event ID, but memory extraction never runs — listMemoryRecords returns zero records indefinitely regardless of how long you wait.

Passing the short memory store ID (the resource name alone, e.g. my-memory-store-AbCdEf) instead of the full ARN produces the correct behaviour: extraction completes in ~60–90 seconds and records appear.

The Bedrock AgentCore console and CLI documentation show ARNs as the canonical identifier for memory stores, so it is natural (and expected) to store the ARN in configuration and pass it directly to the SDK.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

BedrockAgentCoreClient should accept a full ARN as memoryId and either:

Passing arn:aws:bedrock-agentcore:us-west-2:111122223333:memory/my-memory-store-AbCdEf should produce the same behaviour as passing my-memory-store-AbCdEf.

Current Behavior

The service silently accepts the event (HTTP 201, valid eventId returned) but never invokes extraction, so listMemoryRecords always returns an empty result.

Reproduction Steps

BedrockAgentCoreClient client = BedrockAgentCoreClient.builder()
      .region(Region.US_WEST_2)
      .credentialsProvider(DefaultCredentialsProvider.create())
      .build();
  
  String memoryId = "arn:aws:bedrock-agentcore:us-west-2:111122223333:memory/my-memory-store-AbCdEf";

  // Returns HTTP 201 with a valid eventId — looks like success
  CreateEventResponse response = client.createEvent(r -> r
      .memoryId(memoryId)
      .actorId("test-actor-1")
      .sessionId("test-session-1")
      .eventTimestamp(Instant.now())
      .payload(
          PayloadType.builder().conversational(Conversational.builder()
              .role(Role.USER)
              .content(Content.builder().text("I always prefer metric units.").build())
              .build()).build(),
          PayloadType.builder().conversational(Conversational.builder()
              .role(Role.ASSISTANT)
              .content(Content.builder().text("Understood, I will use metric units.").build())
              .build()).build()
      )
  );
  
  // Wait 2 minutes, then check — always returns 0 records
  Thread.sleep(120_000);
  ListMemoryRecordsResponse records = client.listMemoryRecords(r -> r
      .memoryId(memoryId)
      .namespacePath("/orgs/test-actor-1/")
  );
  System.out.println(records.memoryRecordSummaries().size()); // prints 0
  
  // Replace memoryId with "my-memory-store-AbCdEf" above → records appear within 60–90s

Possible Solution

Either error or accept the ARN.

Additional Information/Context

No response

AWS Java SDK version used

AWS Java SDK version: 2.46.3

JDK version used

Zulu 25.28+85-CA, openjdk version "25" 2025-09-16 LTS

Operating System and version

macOS 15 (Darwin 25.5.0)

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions