Skip to content

benitomartin/aws-multimodal-bedrock-dynamodb

Repository files navigation

Multimodal Bill Scan System with Claude 3 Sonnet, AWS CDK, Bedrock, DynamoDB 🗽

bedrock-dynamo

This repository contains a full multimodal application using AWS CDK as IaC, Claude 3 Sonnet as multimodal model, and DynamoDB as storage.

For detailed project descriptions, refer to this Medium article.

Main Steps

  • Data Ingestion: Load data to an S3 Bucket
  • Model: Claude 3 Sonnet in AWS Bedrock
  • Messaging: AWS SQS
  • Storage: AWS DynamoDB
  • Notifications: AWS SNS
  • IaC: AWS CDK

Feel free to ⭐ and clone this repo 😉

Tech Stack

Visual Studio Code Python Anaconda Linux Ubuntu Git AWS

Project Structure

The project has been structured with the following files:

  • data: sample scanned bill
  • app.py: AWS CDK synthesizer
  • aws_multimodal_bedrock_dynamodb_stack: script to create the constructs and stack
  • lambda: lambda functions
  • requirements.txt: project requirements

Project Set Up

The Python version used for this project is Python 3.11. You can follow along the medium article.

  1. Create an empty respository locally. This is necessary to initialize CDK. Afterwards you can copy the files from this repository.

  2. Initialize AWS CDK to create the project structure:

    cdk init app --language python
  3. Create the virtual environment named main-env using Conda with Python version 3.11:

    conda create -n main-env python=3.11
    conda activate main-env
  4. Install the requirements.txt:

    pip install -r requirements.txt
  5. Synthesize the app:

    cdk synth
  6. Bootstrap the app to provision S3, and IAM roles:

    cdk bootstrap aws://{Account ID:}/{region}
  7. Deploy the app on AWS CDK

    cdk deploy
  8. Upload the scanned bill into the S3 Bucket and check that you receive a notification in your email (add your email in the aws_multimodal_bedrock_dynamodb_stack file before deployment)

  9. Clean up

    cdk destroy