Skip to content

Conversation

@dineshSajwan
Copy link
Contributor

Issue # (if applicable)

Reason for this change

The grantInvoke, grantInvokeRuntime, and grantInvokeRuntimeForUser methods in the BedrockAgentRuntime were only granting permissions to the runtime ARN itself, but not to its sub-resources. This caused permission issues when trying to invoke runtime endpoints from an AWS resource like lambda, as the actual invocation happens on sub-resources (e.g., arn:aws:bedrock-agentcore:region:account:runtime/runtime-id/*).

Description of changes

Updated the resourceArns parameter in three grant methods within runtime-base.ts:

Describe any new or updated permissions being added

The IAM permissions granted by these methods now include:

  • bedrock-agentcore:InvokeAgentRuntime on both the runtime ARN and its sub-resources
  • bedrock-agentcore:InvokeAgentRuntimeForUser on both the runtime ARN and its sub-resources

Description of how you validated changes

Manual and Integration test

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team October 27, 2025 18:33
@github-actions github-actions bot added p2 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK labels Oct 27, 2025
@dineshSajwan dineshSajwan marked this pull request as ready for review October 27, 2025 18:33
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter fails with the following errors:

❌ Features must contain a change to a README file.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation added the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Oct 27, 2025
@Abogical Abogical self-assigned this Oct 29, 2025
// Create a single runtime (similar to the working strands example)
const runtime = new agentcore.Runtime(stack, 'TestRuntime', {
runtimeName: 'integ_test_runtime',
runtimeName: 'integTest_runtime',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2 pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants