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: CDK deployments adding action group functions aren't creating versions or updating the agent alias #767

Open
1 task done
titanian229 opened this issue Oct 24, 2024 · 1 comment
Labels
backlog bug Something isn't working

Comments

@titanian229
Copy link

Describe the bug

I've been CDK deploying a stack creating a Bedrock Agent with several action groups, after quite a few successful deployments that created versions and updated the alias no deploy now is creating new Agent Versions or updating the existing alias.

This is the agent's CDK code:

const bedrockAgent = new genAIBedrock.Agent(this, 'bedrock-agent-quiz', {
      foundationModel: genAIBedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_SONNET_V1_0,
      instruction: "Redacted.",
      description: 'Redacted',
      enableUserInput: false,
      existingRole: agentRole,
      name: `bedrockAgent-redacted${suffix}`,
      aliasName: `bedrockAgentAlias-redacted${suffix}`,
      shouldPrepareAgent: true,
      actionGroups: [],
    });

    bedrockAgent.addActionGroup(actionGroupBuild.questionActionGroup);
    bedrockAgent.addActionGroup(actionGroupBuild.createActionGroup);

Documentation says providing an aliasName with shouldPrepareAgent should be creating the version and updating the existing alias that I've previously deployed.

Expected Behavior

CDK deployments of my Bedrock stack should be creating new agent versions and referencing those versions in the existing agent alias.

Current Behavior

I can see my latest action group function definitions in the latest version, and the alias is referencing that version, but it's only seeing the action groups defined at the time of the agent version creation.

Reproduction Steps

  1. CDK deploy stack containing action group with an alias name provided and shouldPrepareAgent on
  2. Add an action group function
  3. CDK deploy stack again

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.163.1

Framework Version

0.1.278

Node.js Version

20

OS

Mac OS 14.4.1

Language

Typescript

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
@titanian229 titanian229 added bug Something isn't working needs-triage This issue or PR still needs to be triaged. labels Oct 24, 2024
@titanian229
Copy link
Author

After some debugging I can confirm, the issue is the agent alias isn't being updated, it's not unique to the CDK code being deployed as deploying the same stack to a different AWS account updates the alias and creates a new agent version. Looking at CloudTrail events during the deployment I don't see the UpdateAgentAlias or CreateAgentAlias API calls to Bedrock occurring.

@krokoko krokoko added backlog and removed needs-triage This issue or PR still needs to be triaged. labels Nov 4, 2024
@krokoko krokoko moved this from Backlog to In Progress in AWS Generative AI Constructs Backlog Dec 10, 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
Projects
Development

No branches or pull requests

2 participants