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

New test branch for Claude3.5 #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
Binary file added .DS_Store
Binary file not shown.
Binary file modified ActionGroups/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions Infra_cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Parameters:
BedrockModelId:
Type: String
Description: The ID of the Foundation Model to use for the Agent
Default: anthropic.claude-3-sonnet-20240229-v1:0
Default: anthropic.claude-3-5-sonnet-20240620-v1:0
EnvironmentName:
Type: String
Description: The name of the agent environment, used to differentiate agent application. Must be lowercase, contain one number, and be no more than 5 characters long.
Expand All @@ -28,7 +28,7 @@ Parameters:
GithubLink:
Type: String
Description: 'The link to the agent build cloudformation stack'
Default: 'https://github.com/aws-samples/amazon-bedrock-agents-cancer-biomarker-discovery.git'
Default: 'https://github.com/berilunay/amazon-bedrock-agents-cancer-biomarker-discovery.git'
ImageTag:
Type: String
Default: latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Here is an example chain of thought sequence with the agent. 11 questions are li
2. Deploy the `Infra_cfn.yaml` template:
- Default parameter values can remain unchanged
- Parameter descriptions:
- `BedrockModelId`: ID of the Foundation Model for the Agent (permissions scoped to Anthropic Claude 3 Sonnet model)
- `BedrockModelId`: ID of the Foundation Model for the Agent (permissions scoped to Anthropic Claude 3.5 Sonnet model)
- `EnvironmentName`: Differentiates the application if launched in the same AWS account (lowercase, one number, max 5 characters)
- `RedshiftDatabaseName`: Name for the Redshift database
- `RedshiftUserName`: Username for Redshift database login
Expand Down
20 changes: 14 additions & 6 deletions agent_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Parameters:
BedrockModelId:
Type: String
Description: The ID of the Foundation Model to use for the Agent
Default: anthropic.claude-3-sonnet-20240229-v1:0
Default: anthropic.claude-3-5-sonnet-20240620-v1:0
EnvironmentName:
Type: String
Description: The name of the agent environment, used to differentiate agent application. Must be lowercase, contain one number, and be no more than 5 characters long.
Expand All @@ -15,7 +15,7 @@ Parameters:
ConstraintDescription: Must be lowercase, contain one number at the end, and be no more than 5 characters long.
GitRepoURL:
Type: String
Default: 'https://github.com/aws-samples/amazon-bedrock-agents-cancer-biomarker-discovery.git'
Default: 'https://github.com/berilunay/amazon-bedrock-agents-cancer-biomarker-discovery.git'
Description: Git repository URL where the code files are stored
ImageTag:
Type: String
Expand Down Expand Up @@ -1185,6 +1185,7 @@ Resources:
"summary": "Query pubmed to relevant information from abstracts of biomedical articles.",
"description": "Query pubmed to relevant information from abstracts of biomedical articles. The PubMed API takes in the user query then returns the abstracts of top 5 relevant articles.",
"operationId": "query-pubmed",
"x-requireConfirmation": "ENABLED"
"parameters": [
{
"name": "query",
Expand Down Expand Up @@ -1252,11 +1253,17 @@ Resources:
Statement:
- Effect: Allow
Action:
- bedrock:InvokeModel
- bedrock:InvokeModel*
- bedrock:Retrieve
Resource:
- !Sub arn:aws:bedrock:${AWS::Region}::foundation-model/${BedrockModelId}
- !Sub arn:aws:bedrock:us-east-1::foundation-model/${BedrockModelId}
- !Sub arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:knowledge-base/${BedrockKnowledgeBase}
- !Sub arn:aws:bedrock:us-west-2::foundation-model/${BedrockModelId}
- !Sub arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0
- !Sub arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0
- !Sub arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:inference-profile/us.anthropic.claude-3-5-sonnet-20240620-v1:0
- !Sub arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:inference-profile/us.anthropic.claude-3-sonnet-20240229-v1:0


########################
##### ActionGroup #####
Expand Down Expand Up @@ -1485,7 +1492,7 @@ Resources:
ImagingLambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName: ImagingBiomarkerLambdaExecutionRole
RoleName: ImagingBiomarkerLambdaExecutionRole-${AWS::Region}'
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
Expand Down Expand Up @@ -1807,7 +1814,7 @@ Resources:
BedrockKBExecutionRole:
Type: 'AWS::IAM::Role'
Properties:
RoleName: !Sub 'AmazonBedrockExecutionRoleForKnowledgeBase_${EnvironmentName}'
RoleName: !Sub 'AmazonBedrockExecutionRoleForKnowledgeBase_${EnvironmentName}_${AWS::Region}'
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
Expand All @@ -1832,6 +1839,7 @@ Resources:
Resource:
- !Sub 'arn:aws:bedrock:${AWS::Region}::foundation-model/amazon.titan-embed-text-v1'
- !Sub 'arn:aws:bedrock:${AWS::Region}::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0'
- !Sub 'arn:aws:bedrock:${AWS::Region}::foundation-model/anthropic.claude-3-5-sonnet-20240620-v1:0'
Sid: BedrockInvokeModelStatement
- PolicyName: OSSPolicy
PolicyDocument:
Expand Down
4 changes: 2 additions & 2 deletions streamlitapp/streamlit_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Parameters:

GitRepoURL:
Type: String
Default: 'https://github.com/aws-samples/amazon-bedrock-agents-cancer-biomarker-discovery.git'
Default: 'https://github.com/berilunay/amazon-bedrock-agents-cancer-biomarker-discovery.git'
Description: Git repository URL where the code files are stored

EnvironmentName:
Expand All @@ -46,7 +46,7 @@ Resources:
Type: "AWS::IAM::ManagedPolicy"
Properties:
Path: /
ManagedPolicyName: !Sub "LogsPolicy${EnvironmentName}"
ManagedPolicyName: !Sub "LogsPolicy${EnvironmentName}${AWS::Region}"
PolicyDocument:
Version: '2012-10-17'
Statement:
Expand Down