Guide to Creating an AWS Bedrock Knowledge Base application

Step1 : Creating an IAM User:

1.????? Click on IAM from AWS console or you can type IAM in the search bar

2.????? Access Management Dashboard>User Groups>Create Group


3.????? Attach these policies to the User group – Otherwise you won’t be able to access data from the user or use OpenSearch knowledge base


4.Users>Create User

?5.Add user to group

6. user>Security Credential>Create Access Key> Other>Next>Create Access Key>Download CSV file and save credentials for later



?

?

Step 2 : Requesting Access to Bedrock FM models

1. Console>Amazon Bedrock>Model Access

?


2.Manage Model Access>Anthropic>Submit use case details > Request Model Access> Select all


?

?

Step 3 : Setting up AWS credentials in Github Codespaces using Boto3 (Setting up Environment Variable)

1. Settings menu>Code Spaces> Codespace user secrets> New secret> Add your AWS credentials here> Attach to the Repository > Add Secret


?

?

?

?

?Step 4 : Setting up Knowledge Base

1. Console Home>S3 > Create Bucket>upload> Add files


2. Amazon Bedrock> Knowledge Base>Create Knowledgebase> Data source>Browse S3> Add the S3 that you created in the step above > Choose an embeddings Model(Titan V2)> It uses OpenSearch serverless as vector store







3. Copy the Knowledge base ID > We need it to access Knowledge base from CodeSpaces


Step 5 : Creating Github Codespace

1.Go to Github Account>Click on the repository you want to create codespaces for > Click on code> Create codespace in main > Query your knowledge base

?



Step 6 : Cleanup & Cost for AWS resources( Make sure to delete after use):



Clean up > Make sure to delete s3 , user and codespace

要查看或添加评论,请登录

Mrin ..的更多文章

社区洞察

其他会员也浏览了