Skip to content

Commit

Permalink
Added code to create bedrock vpc endpoint as the models list timesout
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu authored and bigadsoleiman committed Jun 19, 2024
1 parent 1418b5c commit 75f5704
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,16 @@ export class Shared extends Construct {
if (props.config.bedrock?.region !== cdk.Stack.of(this).region) {
throw new Error(`Bedrock is only supported in the same region as the stack when using private website (Bedrock region: ${props.config.bedrock?.region}, Stack region: ${cdk.Stack.of(this).region}).`);
}

vpc.addInterfaceEndpoint("BedrockEndpoint", {
service: new ec2.InterfaceVpcEndpointService('com.amazonaws.'+cdk.Aws.REGION+'.bedrock-runtime', 443),
privateDnsEnabled: true
service: ec2.InterfaceVpcEndpointAwsService.BEDROCK,
});

vpc.addInterfaceEndpoint("BedrockRuntimeEndpoint", {
service: ec2.InterfaceVpcEndpointAwsService.BEDROCK_RUNTIME,
});


}

// Create VPC Endpoint for Kendra
Expand Down

0 comments on commit 75f5704

Please sign in to comment.