Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/cdk/lib/construct/generic-agent-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,23 @@ export class GenericAgentCore extends Construct {
})
);

// Add permission to create AgentCore service-linked role (required since Oct 13, 2025)
role.addToPolicy(
new PolicyStatement({
sid: 'CreateBedrockAgentCoreRuntimeIdentityServiceLinkedRole',
effect: Effect.ALLOW,
actions: ['iam:CreateServiceLinkedRole'],
resources: [
`arn:aws:iam::*:role/aws-service-role/runtime-identity.bedrock-agentcore.amazonaws.com/AWSServiceRoleForBedrockAgentCoreRuntimeIdentity`,
],
conditions: {
StringEquals: {
'iam:AWSServiceName': 'runtime-identity.bedrock-agentcore.amazonaws.com',
},
},
})
);

return role;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4526,6 +4526,17 @@ exports[`GenerativeAiUseCases matches the snapshot (closed network mode) 4`] = `
"Resource": "*",
"Sid": "IAMPassRolePermissions",
},
{
"Action": "iam:CreateServiceLinkedRole",
"Condition": {
"StringEquals": {
"iam:AWSServiceName": "runtime-identity.bedrock-agentcore.amazonaws.com",
},
},
"Effect": "Allow",
"Resource": "arn:aws:iam::*:role/aws-service-role/runtime-identity.bedrock-agentcore.amazonaws.com/AWSServiceRoleForBedrockAgentCoreRuntimeIdentity",
"Sid": "CreateBedrockAgentCoreRuntimeIdentityServiceLinkedRole",
},
],
"Version": "2012-10-17",
},
Expand Down Expand Up @@ -25739,6 +25750,17 @@ exports[`GenerativeAiUseCases matches the snapshot 4`] = `
"Resource": "*",
"Sid": "IAMPassRolePermissions",
},
{
"Action": "iam:CreateServiceLinkedRole",
"Condition": {
"StringEquals": {
"iam:AWSServiceName": "runtime-identity.bedrock-agentcore.amazonaws.com",
},
},
"Effect": "Allow",
"Resource": "arn:aws:iam::*:role/aws-service-role/runtime-identity.bedrock-agentcore.amazonaws.com/AWSServiceRoleForBedrockAgentCoreRuntimeIdentity",
"Sid": "CreateBedrockAgentCoreRuntimeIdentityServiceLinkedRole",
},
],
"Version": "2012-10-17",
},
Expand Down
Loading