Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"sts_client = boto3.client('sts')\n",
"account_id = sts_client.get_caller_identity()[\"Account\"]\n",
"\n",
"bucket_name_kb = f'bedrock-kb-{suffix}-1' # replace it with your first bucket name.\n",
"bucket_name_kb = f'bedrock-kb-{account_id}-{suffix}-1' # replace it with your first bucket name.\n",
"region_name = \"us-west-2\" # can be removed ones BDA is GA and available in other regions.\n",
"region = region_name\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"session = boto3.session.Session()\n",
"region_name = session.region_name\n",
"\n",
"bucket_name_kb = f'bedrock-kb-{suffix}-1' # replace it with your first bucket name.\n",
"bucket_name_kb = f'bedrock-kb-{account_id}-{suffix}-1' # replace it with your first bucket name.\n",
"\n",
"s3_client = boto3.client('s3', region_name=region_name)\n",
"\n",
Expand All @@ -145,7 +145,7 @@
"# Function to check if the bucket exists, if not, create the data_bucket\n",
"from utils.knowledge_base_operators import bucket_exists\n",
"suffix = random.randrange(200, 900)\n",
"bucket_name_kb = f'bedrock-bda-kb-{suffix}-1' \n",
"bucket_name_kb = f'bedrock-bda-kb-{account_id}-{suffix}-1' \n",
"# Create S3 bucket for the KB if it doesn't exist\n",
"if not bucket_exists(bucket_name_kb):\n",
" print(f\"Bucket '{bucket_name_kb}' does not exist. Creating it now...\")\n",
Expand Down