AppSync & Bedrock WebSocket API

December 2023

A simple AppSync GraphQL Websocket API backed by AWS Bedrock and built with CDK and Langchain, for a chatbot to provide real-time chat functionality.

This project showcases a serverless and scalable chatbot implemented using AWS CDK Infrastructure-as-code. The architecture leverages AWS AppSync with a WebSocket API for real-time chat functionality, supported by AWS Bedrock for advanced AI capabilities.

The system is designed using several AWS services to create its scalable infrastructure, including DynamoDB for storing chat threads and messages, SQS as a message queue, and Lambda for handling Bedrock invocation. Authentication is managed through Cognito, and the frontend, built using Vite and TypeScript; CloudFront is used for a static file CDN and S3 for storage. The event flow involves AppSync API interactions, Lambda invocations, and real-time updates through subscriptions, creating a seamless and efficient Gen AI application.