Skip to content

Amazon Bedrock Agent Samples - create_confluence_credentials_secret defaults us-west-2Β #68

@thedataengineer

Description

@thedataengineer

Describe the bug

Region mismatch between AWS Secrets Manager and Amazon Bedrock Knowledge Base causes validation error during data source creation. The code attempts to create secrets in us-west-2 while the Knowledge Base exists in us-east-1, resulting in a breaking change.

To Reproduce

  • Clone the repository and navigate to the support_agent directory
  • Run the script with Confluence credentials:
    python3 main.py --recreate_agents "true" --confluence_url "your_confluence_url" --username "your_username" --token "your_token"
  • Script attempts to create a Knowledge Base with Confluence data source
  • Validation error occurs during CreateDataSource operation

Expected behavior

  • The script should create both the Secrets Manager secret and the Knowledge Base in the same region as provisioned/configured ( in my case - us-east-1) to allow proper integration between services.

Error Message

  • botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the CreateDataSource operation:

Provided Amazon Resource Name (ARN) for secret authentication credentials in Secrets Manager is in a different region to the region of your knowledge base. Please provide a secret ARN in us-east-1, the same region as your knowledge base.

Additional context

  • Environment: Local Python environment
  • Python version: 3.13
  • boto3 version: 1.37.11
  • AWS Services affected: Amazon Bedrock, AWS Secrets Manager
  • Repository: amazon-bedrock-agent-samples
  • Path: examples/multi_agent_collaboration/support_agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions