Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bedrock: error attaching same action group to multiple agents #747

Open
1 task done
mccauleyp opened this issue Oct 14, 2024 · 0 comments
Open
1 task done

bedrock: error attaching same action group to multiple agents #747

mccauleyp opened this issue Oct 14, 2024 · 0 comments
Labels
backlog bug Something isn't working

Comments

@mccauleyp
Copy link

mccauleyp commented Oct 14, 2024

Describe the bug

I'm trying to use the same Lambda-based Action Group for multiple Bedrock Agents. When I try that using the .add_action_group() method of the Agent construct, I get the following error:

RuntimeError: Error: There is already a Construct with name 'AgentLambdaInvocationPolicy' in DockerImageFunction [MyLambdaId]

I think this is due to a limitation of the CDK constructs and not the Bedrock service disallowing the same Action Group being used for multiple agents. Potentially it could be fixed by changing the construct ID AgentLambdaInvocationPolicy to include the construct ID of each Agent.

Expected Behavior

I think same Lambda should be usable by multiple Agents.

Current Behavior

See first section.

Reproduction Steps

Create a Lambda-based Action Group and try to attach it to add it to two different agents via the .add_action_group method of the Agent construct.

Possible Solution

Use an identifier unique to the Agent construct when creating the AgentLambdaInvocationPolicy ID.

Additional Information/Context

No response

CDK CLI Version

2.162.1

Framework Version

0.1.271

Node.js Version

v20.11.0

OS

OSX

Language

Python

Language Version

No response

Region experiencing the issue

us-east-1

Code modification

No

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct
@mccauleyp mccauleyp added bug Something isn't working needs-triage This issue or PR still needs to be triaged. labels Oct 14, 2024
@krokoko krokoko added backlog and removed needs-triage This issue or PR still needs to be triaged. labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog bug Something isn't working
Development

No branches or pull requests

2 participants