StreamNative + AI with AWS Bedrock

About this Tutorial

This free short course will introduce you to using serverless Python Pulsar Functions to integrate AI into your streaming applications. Add a subscription to an existing topic to quickly create vector embeddings or use Pulsar Functions to automate entire AI workflows. For many examples, we use AWS Bedrock’s Foundation Models. Connecting to AWS Bedrock from Python Pulsar Functions is fast and easy (just see the code samples!) with a wide range of state-of-the-art models available through a single API. This course is designed to inspire you to continue exploring what AWS Bedrock has to offer and try incorporating it into your streaming applications. Additional AWS Bedrock training materials are available here.

The following are just some of the functionalities possible with Python Pulsar Functions you’ll be introduced to in the course:

  • Convert unstructured text into a structured JSON with sentiment analysis
  • Use AWS Bedrock or OpenAI to create vector embeddings
  • Sync embeddings to AWS RDS Postgres database with pgvector or Milvus/Zilliz
  • Complete a similarity search
  • Summarize data using Meta’s Llama 3.2

Requirements

Directions are provided for creating a StreamNative cluster using a $200 credit, service account, and installing and configuring pulsarctl to deploy Pulsar Functions. Resources outside of StreamNative are required and may have additional costs:

  • Examples A, B, and C require access to AWS Bedrock Foundation Models such as Anthropic Claude or Cohere.
  • Example C requires access to a Postgres database with pgvector such as Postgres available in AWS RDS.
  • Examples C and D use AWS Bedrock Foundation Model Meta’s Llama 3.2 to summarize data.
  • Example D uses OpenAI for creating vector embeddings and Zilliz as a vector database.