fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs (#8088)

* fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs

Keep runtime ARNs stable across versions and use the parent runtime ID and endpoint name for endpoint ARNs. Update API responses, ARN lookups, tagging dispatch and CloudFormation references together.

* fix(bedrock-agentcore): preserve legacy and harness runtime lookups
This commit is contained in:
galsuchetzky-act authored and GitHub committed 2026-11-12 08:17:29 -04:00
1 parent 8bdf86420b
commit f2a0bfce4e
23 files changed
+360 -94

No files matched your search

@@ -63,7 +63,7 @@ class BedrockAgentCoreControlTest {
assertThat(runtimeId).startsWith(runtimeName + "-");
assertThat(response.agentRuntimeVersion()).isEqualTo("1");
assertThat(response.statusAsString()).isEqualTo("READY");
assertThat(response.agentRuntimeArn()).contains(":bedrock-agentcore:").contains(":agent/");
assertThat(response.agentRuntimeArn()).contains(":bedrock-agentcore:").contains(":runtime/" + runtimeId);
assertThat(response.workloadIdentityDetails().workloadIdentityArn()).isNotBlank();
}
@@ -66,7 +66,7 @@ class BedrockAgentCoreEndpointTest {
assertThat(response.endpointName()).isEqualTo("prod");
assertThat(response.targetVersion()).isEqualTo("1");
assertThat(response.statusAsString()).isEqualTo("READY");
assertThat(response.agentRuntimeEndpointArn()).contains(":agentEndpoint/");
assertThat(response.agentRuntimeEndpointArn()).contains(":runtime/" + runtimeId + "/runtime-endpoint/prod");
}
@Test
@@ -13,7 +13,7 @@ import static org.assertj.core.api.Assertions.*;
class BedrockAgentCoreInvokeTest {
private static final String ARN =
"arn:aws:bedrock-agentcore:us-east-1:000000000000:agent/abcdef12-3456-7890-abcd-ef1234567890:1";
"arn:aws:bedrock-agentcore:us-east-1:000000000000:runtime/test-AbCdEfGhIj";
private static final String SESSION_ID = "session-0000000000000000000000000000abc";
@Test