Introduction to AI with StreamNative Pulsar Functions and AWS Bedrock
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.
Let’s start by introducing you to Pulsar Functions and AWS Bedrock.
Pulsar Functions
Pulsar functions are lightweight functions that consume messages from Pulsar topics, apply custom processing logic, and publish the results of the computation to other topics.
The following languages are supported:
- Java
- Python
- Golang (Private Preview)
- NodeJs (Private Preview)
- WASM (Private Preview)
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
With Pulsar Functions, your Python code will trigger when messages are written to a topic, publishing their results to an output topic and creating a real-time streaming AI workflow.
AWS Bedrock
AWS Bedrock is a fully managed service offering a choice of high-performing foundation models (FMs) from leading AI companies like AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon through a single API.
We hope by the end of this training you will see how easy it is to connect to AWS Bedrock from Python Pulsar Functions, taking advantage of the many state-of-the-art models accessible in AWS Bedrock. By the end of this training, you will have used AWS Bedrock with Cohere, Anthropic’s Claude, and Meta’s Llama 3.2, all through the simple AWS Bedrock API.
Additional AWS Bedrock training resources are available here. Example A and Example B from this training are directly adapted from the AWS Bedrock training.
If you are an early stage startup, AWS recommends applying for Activate credits here. If you are working at a later stage startup or enterprise with an established presence on AWS, contact your AWS account team to discuss proof of concept funding.
