ottlseo / bedrock-ai-tutor

GenAI w AWS CDK example using Anthropic Claude 3.0 Haiku & Sonnet
https://d2s3v0hqemilkh.cloudfront.net
1 stars 1 forks source link
aws-cdk-typescript bedrock claude lambda prompt-engineering

Bedrock AI Tutor

image
Claude model comparison mode Business conversation transition mode
image image

Architecture

architecture

How to deploy on your environment using AWS CDK

Prerequisites

  1. ✅ Make sure you have the cdk installed in your environment. If you don't have cdk, follow the link and install CDK: https://docs.aws.amazon.com/ko_kr/cdk/v2/guide/getting_started.html
    # To check if you have AWS CDK
    cdk --version   ## if you don't have cdk -- Follow the link above and install it. 
  1. ✅ Make sure you have the aws credential information stored in ~.aws/credentials.

    # To check if you have credential info
    vi ~/.aws/credentials
    
    ## if the file is empty, please add your credentials using the command below.
    aws configure # and enter your REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY. 

CDK Stack deployment

1. Enable Anthropic Claude model access on the Amazon Bedrock console

2. Deploy ApiStack

cdk bootstrap
cdk deploy ApiStack

# After deployment finished, the API Gateway Endpoint will be printed.
image

3. Updating the API URL in your frontend code

Copy the API Endpoint that came out as output in step2, find the INSERT_YOUR_API_GW_ENDPOINT string in lib/WebStack/fe/index.html and replace it with the copied API URL.

image

4. Deploy WebStack

cdk bootstrap
cdk deploy WebStack

# After deployment finished, the Cloudfront URL will be printed.
image