aws-sdk-java-v2-bedrock

Integrate Amazon Bedrock model discovery and invocation into Java applications.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/rizaldiem/digital-invitation-web_V2 --skill aws-sdk-java-v2-bedrock-rizaldiem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-java-v2-bedrock
Source: https://github.com/rizaldiem/digital-invitation-web_V2/tree/main/.windsurf/skills/aws-sdk-java-v2-bedrock
Command: npx skills add https://github.com/rizaldiem/digital-invitation-web_V2 --skill aws-sdk-java-v2-bedrock-rizaldiem

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies integrating Amazon Bedrock foundation models into Java applications using the AWS SDK for Java 2.x by providing discovery, invocation, streaming, embedding, image generation, and Spring Boot integration patterns.

Core Features & Use Cases

  • Model discovery and inspection patterns for Amazon Bedrock foundation models (Claude, Llama, Titan, Stability, etc.).
  • Invocation templates for text generation, image generation, embeddings extraction, and streaming responses.
  • Spring Boot integration examples, client configuration, retry/backoff strategies, performance optimizations, and security best practices.
  • Use Case: implement a Spring Boot microservice that invokes Bedrock models for chat assistants, streams long responses to clients, and stores embeddings for RAG.

Quick Start

Invoke the Anthropic Claude Sonnet model 'anthropic.claude-sonnet-4-5-20250929-v1:0' with a configured BedrockRuntimeClient to generate a simple explanation of quantum computing.

Frequently Asked Questions about aws-sdk-java-v2-bedrock

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I invoke Amazon Bedrock models in Java using the AWS SDK for Java 2.x?

To invoke Amazon Bedrock models in Java, use the AWS SDK for Java 2.x BedrockRuntimeClient to send prompts and receive generated text, images, or embeddings. Configure region-aware clients and include the bedrockruntime dependency to handle model invocations.

Can I stream responses from Amazon Bedrock in a Spring Boot application?

Yes, you can stream Amazon Bedrock responses in Spring Boot by implementing streaming handlers with the AWS SDK for Java 2.x. This allows your microservice to efficiently stream long text generation responses directly to clients without waiting for full payloads.

What AWS permissions are needed to use Bedrock for text generation and embeddings?

Using Bedrock for text generation and embeddings requires AWS credentials with specific Amazon Bedrock permissions. You must configure region-aware clients with appropriate IAM roles to securely discover foundation models and invoke them for generating outputs.

How do I discover Amazon Bedrock foundation models like Claude and Titan in Java?

Discover Amazon Bedrock foundation models like Claude, Titan, and Llama in Java by using the model discovery patterns provided with the BedrockClient. This allows your application to inspect and list available models before configuring the runtime client for invocation.

What is the best way to handle retries when invoking Amazon Bedrock in Java applications?

The best way to handle Amazon Bedrock invocation retries in Java is to implement retry and backoff strategies within your BedrockRuntimeClient configuration. This ensures resilient communication with foundation models during transient network issues.

Does this Skill provide patterns for building a RAG pipeline with Amazon Bedrock in Java?

Yes, it provides patterns for building a RAG pipeline with Amazon Bedrock in Java by creating embeddings using the BedrockRuntimeClient and integrating them into a Spring Boot microservice. This supports storing embeddings for retrieval and generating context-aware chatbot responses.