AWS Logo
Menu

Amazon Bedrock Code Examples

This page provides a comprehensive list of Amazon Bedrock code examples featured on community.aws. It serves as a one-stop-shop for developers looking to explore and leverage the capabilities of Amazon Bedrock.

C#, Go, Java, JavaScript, PHP, Python:

Code examples in the Amazon Bedrock User Guide

The Amazon Bedrock User Guide offers a growing list of code examples demonstrating how to use Bedrock with various AWS SDKs. It showcases multiple programming languages, providing a great resource to get started.

C#/.NET:

.NET FM Playground

The .NET FM Playground is a .NET MAUI Blazor sample application demonstrating how to leverage Amazon Bedrock from C# code. It serves as a practical example for developers working with .NET and Amazon Bedrock.
Explore the project on GitHub.
Learn more: Blog post.

Go:

AWS Go SDK examples for Amazon Bedrock

This repository provides examples of using the AWS Go SDK with Amazon Bedrock, covering various use cases such as invoking the Bedrock API, listing Foundation Models (FMs), handling streaming output, and more.
Check it out on GitHub.
Dive deeper: Blog post.

Java:

Amazon Bedrock Java Examples

This repository offers examples using the AWS SDK for Java to help developers get started with the Amazon Bedrock service. It serves as a practical resource for Java developers working with Amazon Bedrock.
Explore the examples on GitHub.

Java FM Playground

The Java FM Playground is a Spring Boot/Next.js sample application showcasing how to leverage Amazon Bedrock with Java. It includes examples for chatbots, text playgrounds, image generation, and more.
Check it out on GitHub.

Amazon Bedrock with Builder and Command Patterns

This repository provides a simple yet powerful implementation in Java that allows developers to write straightforward code to create API requests for the various foundation models supported by Amazon Bedrock.
Explore the repo on GitHub.
Learn more: Blog post / Video.

Python:

Amazon Bedrock Quick Start

This repository offers a quick start guide to building generative AI applications with Amazon Bedrock. It provides a practical introduction for developers looking to get started with Amazon Bedrock using Python.

Getting started with Amazon Bedrock, RAG, and vector databases in Python

This repository explores sample applications and tutorials demonstrating the integration of Amazon Bedrock with databases, RAG techniques, and experiments with langchain and streamlit in Python.
Explore the repo on GitHub.

Python FM Playground

The Python FM Playground is a FastAPI/Next.js sample application showcasing how to leverage Amazon Bedrock with Python. It includes examples for chatbots, text playgrounds, image generation, and more.
Get started: Python FM Playground.

RAG with history memory agents using Amazon Bedrock, Amazon Kendra, Amazon Lambda Function, and Amazon DynamoDB

This repository demonstrates a use case for RAG (Retrieval-Augmented Generation) by implementing an agent with memory capable of following a fluid conversation to query the re:invent 2023 agenda.
Check it out on GitHub.

Elevating Customer Support With Rag Langchain Agent Bedrock Dynamodb And Kendra

This repository provides a Whatsapp assistant app that understands multiple languages and aims to provide self-service support through natural conversation or voice messages for common travel issues.
Explore the project on GitHub.