New advertisers: 50% off your first month with code FIRSTMONTHSee slots
aws-samples avatar

openai-to-nova-migration

Migrate OpenAI GPT-4o/4.1/5.x code and prompts (via the OpenAI API or hosted on Amazon Bedrock, incl. GPT-5.5/5.4 and gpt-oss) to Amazon Nova 2 Lite.

GitHub stars
460
View on GitHub

Add marketplace

/plugin marketplace add aws-samples/amazon-nova-samples

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install openai-to-nova-migration@aws-samples-amazon-nova-samples

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

OpenAI to Nova 2 Lite Migration

Overview

Migrate Python application code and prompts from OpenAI (GPT-4o, GPT-4.1, GPT-5.x) to Amazon Nova 2 Lite. Transforms SDK calls (openai → boto3 Bedrock Runtime converse API) and rewrites prompts to follow Nova 2 Lite formatting and constraints.

Two source situations are supported:

  1. OpenAI API (api.openai.com) — the customer calls GPT models through the openai SDK. Auth, SDK, request structure, and error handling all change.
  2. OpenAI on Amazon Bedrock — the customer already runs OpenAI models on Bedrock (GPT-5.5/5.4 via the Responses API, or gpt-oss via Converse/Responses/Chat Completions) and wants to swap the model to Nova, often as part of a multi-model bake-off. Auth/Region/billing are already AWS-native, so this is usually lower-effort. See references/openai-on-bedrock-patterns.md.

This is not a one-line model swap (except the trivial gpt-oss-on-Converse case). Every migration delivers two things: working migrated code and an explanation of every change, including any features that cannot be ported 1:1.

Usage

Use this skill when:

  • Converting OpenAI Python code (via api.openai.com) to call Nova 2 Lite via Bedrock
  • Migrating OpenAI models hosted on Amazon Bedrock (GPT-5.5, GPT-5.4, gpt-oss) to Nova 2 Lite
  • Swapping models in a multi-model Bedrock bake-off from an OpenAI model to Nova
  • Rewriting prompts originally written for OpenAI to Nova 2 Lite format
  • Migrating function calling / tool use from OpenAI to Nova
  • Adapting multimodal OpenAI code (images) to Nova 2 Lite (images, video)
  • Converting OpenAI structured output (response_format) to Nova's approach
  • Switching from OpenAI reasoning effort (GPT-5.x) to Nova extended thinking

Core Concepts

Key Differences

  1. SDK (Python): openai → boto3 Bedrock Runtime converse API
  2. Authentication: API key (OPENAI_API_KEY) → AWS IAM credentials (role, profile, env vars)
  3. System prompt: role: "system" message → dedicated system=[{"text": ...}] parameter
  4. Message content: Flat string → typed content blocks ([{"text": "..."}])
  5. Inference params: Top-level max_tokens, temperature, top_p → nested in inferenceConfig with camelCase (maxTokens, topP)
  6. Prompt format: Free-form / markdown → ##Section Name## delimiters
  7. Structured output: Native response_format (JSON schema) → tool-forcing or inline schema
  8. Reasoning: reasoning_effort (GPT-5.x) → additionalModelRequestFields.reasoningConfig
  9. Multimodal images: URL or base64 → raw binary bytes; media MUST precede text

What Cannot Be Migrated Directly

  • Assistants API threads / persistent state → Manage conversation history externally, pass full history each call
  • Built-in code interpreter (Assistants) → Use Nova's nova_code_interpreter built-in tool
  • Built-in file search / retrieval (Assistants) → Use Amazon Bedrock Knowledge Bases
  • Image generation (DALL-E / gpt-image) → Use Amazon Nova Canvas (separate model)
  • Text-to-speech / Whisper → Use Amazon Polly / Amazon Transcribe
  • Realtime API (voice) → Use Amazon Nova Sonic
  • Fine-tuned OpenAI models → Re-run customization on Nova via Amazon Bedrock

Migration Workflow

You MUST follow these steps in order. After each step, confirm findings with the user before proceeding to the next.

Step 1: Analyze the OpenAI Code

First, identify WHERE the model runs — this determines how much changes:

  • OpenAI API (api.openai.com) — plain OpenAI(api_key=...) with no Bedrock base URL. Auth, SDK, and request structure all change. Continue with this workflow.
  • OpenAI on Amazon Bedrock — an openai client pointed at a bedrock-mantle base URL, the BedrockOpenAI client, or boto3 converse/invoke_model with an openai.* model ID. Auth/Region are already AWS-native. You MUST read references/openai-on-bedrock-patterns.md — it identifies the two model classes (GPT-5.5/5.4 Responses-only vs gpt-oss multi-API) and their migration paths, then routes back here for the shared steps (prompt formatting, reasoning, tools).

Then identify the SDK and API style:

  • Chat Completions API — client.chat.completions.create(...) (most common)
  • Responses API — client.responses.create(...) (newer; input= + instructions=, or developer/user roles on Bedrock)
  • Assistants API — client.beta.assistants.create(...) / client.beta.threads.* (stateful, built-in tools)

Then identify which features are used:

  • Basic text generation
  • System prompt / instructions
  • Multi-turn conversation (message history or threads)
  • Function calling / tools
  • Structured output (response_format, JSON mode)
  • Multimodal (images)
  • Streaming
  • Reasoning effort (GPT-5.x reasoning_effort)
  • Built-in tools (code interpreter, file search, web search)

You MUST flag any features in the "cannot migrate" list above and inform the user of alternatives before proceeding.

If the source model is a high-capability reasoning model (gpt-5.5, gpt-5.4, gpt-5.2, o3, o1) run at high reasoning effort, you MUST ask the user whether they have evaluated Nova 2 Lite for their use case. Start every migration with Nova 2 Lite; Nova 2 Pro exists for workloads where Lite with high-effort reasoning still falls short, but the user should validate that need with benchmark data before targeting Pro.

Step 2: Classify the Use Case

Reasoning support by OpenAI model:

OpenAI ModelNative Reasoning Effort
gpt-4o / gpt-4o-miniNo — if CoT is used, it's via prompt text ("think step by step")
gpt-4.1 / gpt-4.1-miniNo
gpt-4 / gpt-3.5-turboNo
gpt-5 / gpt-5.2Yes — reasoning_effort parameter
o1 / o3Yes — reasoning models

Migration rules for reasoning:

  • If the source model does NOT support reasoning effort → omit additionalModelRequestFields entirely. If the prompt uses CoT ("think step by step"), keep that prompt text as-is.
  • If the source model supports reasoning effort but it's NOT enabled → omit additionalModelRequestFields entirely.
  • If reasoning IS enabled → ask the user which Nova reasoning effort level to use:
Nova EffortConfig
lowadditionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "low"}}
mediumadditionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "medium"}}
highadditionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "high"}} — MUST omit inferenceConfig (temperature, topP, maxTokens, topK not allowed) and set client read_timeout=3600

Do NOT map OpenAI's effort level directly to Nova's by name. OpenAI minimal/low/medium/high and Nova low/medium/high are not numerically equivalent. Default to Nova low first, then increase only if evaluation shows quality gaps. Present the three options and let the user decide.

Determine the Nova 2 Lite use case type for correct inference config:

Text/Agentic:

Use CaseTemperatureTop PReasoning
general0.7defaultDISABLED
tool_calling0.70.9DISABLED
tool_calling_reasoning10.9ENABLED
complex_reasoning0.7defaultENABLED

Multimodal:

Use CaseTemperatureReasoning
OCR0.7DISABLED
Key information extraction0OPTIONAL
Object/UI detection0DISABLED
Video summary/caption0OPTIONAL
Video timestamps/classification0DISABLED

Precedence rule (high effort overrides the temperature/topP columns). The temperature and Top P values above apply only when reasoning is disabled or set to low/medium. When maxReasoningEffort is high, you MUST NOT set temperature, topP, topK, or maxTokens — omit inferenceConfig entirely, or the request returns a validation error. So a tool_calling_reasoning workload at high effort drops the temperature=1, topP=0.9 values; at low/medium effort it keeps them. (Per the Amazon Nova 2 User Guide: "Temperature, topP and topK cannot be used with maxReasoningEffort set to high.") Note also that high effort can produce more than 65K output tokens (observed up to 128K) — size your downstream handling accordingly.

Step 3: Migrate the Code

You MUST read references/feature-mapping.md for the complete field mapping table. You SHOULD read references/code-examples.md for before/after patterns.

If the source code uses the Responses API (client.responses.create) or the Assistants API (client.beta.assistants.*), you MUST also read references/chat-completions-patterns.md for the specific parameter mappings, Responses API migration, and Assistants-to-built-in-tools handling.

If the source runs on OpenAI hosted on Amazon Bedrock (identified in Step 1), you MUST read references/openai-on-bedrock-patterns.md instead of / in addition to the above — the source SDK, endpoint, and modelId differ, and the gpt-oss-on-Converse case is nearly a one-line modelId swap.

Ask the user which region-prefixed model ID to use:

Model IDRegion
us.amazon.nova-2-lite-v1:0US (us-east-1, us-west-2)
eu.amazon.nova-2-lite-v1:0EU (eu-west-1, etc.)
jp.amazon.nova-2-lite-v1:0Japan (ap-northeast-1)
global.amazon.nova-2-lite-v1:0Cross-region inference

Default to us.amazon.nova-2-lite-v1:0 if the user doesn't specify.

SDK transformation (Python):

# OpenAI
from openai import OpenAI
client = OpenAI(api_key="...")
response = client.chat.completions.create(model="gpt-4o-mini", messages=[...])

# Nova 2 Lite
import boto3
client = boto3.client("bedrock-runtime")
response = client.converse(modelId="us.amazon.nova-2-lite-v1:0", messages=[...])

Extract the system prompt from the messages array into a dedicated system parameter:

# OpenAI — system is a message
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello"},
]

# Nova — system is a separate parameter; content is a typed block
system = [{"text": "You are a helpful assistant."}]
messages = [{"role": "user", "content": [{"text": "Hello"}]}]

Only include additionalModelRequestFields when reasoning is enabled:

# Reasoning DISABLED (default) — omit additionalModelRequestFields entirely
response = client.converse(modelId="us.amazon.nova-2-lite-v1:0", ...)

# Reasoning ENABLED — include reasoningConfig
response = client.converse(
    modelId="us.amazon.nova-2-lite-v1:0",
    ...,
    additionalModelRequestFields={
        "reasoningConfig": {"type": "enabled", "maxReasoningEffort": "medium"}
    },
)

Step 4: Migrate the Prompt

OpenAI models tolerate loosely phrased instructions. Nova 2 Lite delivers higher quality when the prompt clearly separates task, input, requirements, constraints, and output format. You MUST apply these transformations:

  1. Add explicit structure using ##Section Name## delimiters (the section name is wrapped on both sides by ##, not a markdown header). Convert any markdown headers or inline instructions into canonical Nova sections:

    • ##Task Summary:## — defines the task
    • ##Context Information:## — background
    • ##Model Instructions:## — behavioral rules
    • ##Response style and format requirements:## — output format
    • ##Examples## — few-shot examples
    • ##Reference## — RAG grounding content
  2. For multimodal prompts:

    • Move ALL task instructions from the system prompt to the user prompt
    • Keep the system prompt as persona + response style only
    • Ensure media content precedes text in the content array
  3. Add suppression guardrail where appropriate:

    DO NOT mention anything inside ##Model Instructions## or ##Examples## in the response.
    
  4. For long context (>10K tokens):

    BEGIN INPUT DOCUMENTS
    DOCUMENT 1 START
    {content}
    DOCUMENT 1 END
    END INPUT DOCUMENTS
    
    BEGIN QUESTION
    {query}
    END QUESTION
    
    BEGIN INSTRUCTIONS
    {instructions}
    END INSTRUCTIONS
    

Example transformation — vague OpenAI prompt "Summarize this document and highlight key risks" becomes a structured Nova prompt with explicit ## Task Summary: and ## Response style and format requirements: sections specifying format, columns, tone, and scope. See references/code-examples.md.

Step 5: Migrate Structured Output

If the OpenAI code uses structured output (response_format={"type": "json_object"} or response_format=<Pydantic model> / json_schema), apply this step. Otherwise skip to Step 6.

  • Simple JSON (≤10 keys): Use inline schema in the prompt + temperature=0
  • Complex JSON (>10 keys): Use tool-forcing with the schema in toolSpec.inputSchema and toolChoice={"tool": {"name": ...}}

See references/code-examples.md Example 3 for both patterns.

Step 6: Migrate Tool Calling

If the OpenAI code uses function calling / tools, apply this step. Otherwise skip to Step 7.

Key differences:

  • OpenAI tools=[{"type": "function", "function": {...}}] → Nova toolConfig={"tools": [{"toolSpec": {...}}]}
  • OpenAI function.parameters (JSON Schema) → Nova toolSpec.inputSchema.json (JSON Schema — structurally compatible, re-wrap)
  • OpenAI tool_choice (auto/required/none/named) → Nova toolChoice (auto/any/tool)
  • OpenAI built-in tools (code interpreter, web search) → Nova built-in tools (nova_code_interpreter, nova_grounding) — see references/chat-completions-patterns.md
  • Keep tool descriptions to 20-50 words; parameter descriptions to ~10 words
  • Reference tools by name in the system prompt: Use the 'tool_name' tool for X

Tool use + extended thinking is supported. Nova 2 Lite allows toolConfig together with reasoning enabled — the model reasons about which tools to use and how to interpret their results (per the Amazon Nova 2 User Guide: "Extended thinking works seamlessly with tool calling"). When continuing a tool round-trip with reasoning enabled, append the assistant's full content blocks (including any reasoningContent) back into messages, then add the toolResult in a user-role message.

Step 7: Present the Result

Output format:

## Migrated Code

**Use case:** {type}
**Inference config:** temperature={T}, reasoning={enabled/disabled}
**Breaking changes:** {list any features that couldn't be migrated 1:1}

### Code
{complete migrated code}

### Prompt
**SYSTEM PROMPT:**
{system prompt — persona only for multimodal}

**USER PROMPT:**
{user prompt with ##Section## formatting}

### Implementation Notes
- {inference config rationale}
- {any multimodal ordering requirements}
- {features requiring alternative approach}

Step 8: Validate

You MUST check the migrated code against all criteria below. If any check fails, fix and re-validate before presenting to the user:

  • Authentication uses boto3 client / IAM, not OPENAI_API_KEY
  • System prompt extracted to the system parameter, not a role: "system" message
  • All message content wrapped in typed blocks ([{"text": ...}])
  • Inference params nested in inferenceConfig with camelCase names
  • additionalModelRequestFields is omitted when reasoning is disabled, or contains reasoningConfig when enabled
  • High effort: inferenceConfig removed entirely (no temperature/topP/topK/maxTokens) and read_timeout=3600 set on the client
  • Inference config matches the use case table — EXCEPT at high effort, where the temperature/topP columns do not apply (see precedence rule in Step 2)
  • Multimodal: system prompt contains only persona; media precedes text in content array
  • Images converted from URL/base64 to raw bytes
  • Prompt uses ##Section## delimiters with explicit structure
  • Tool schemas wrapped in toolSpec; tool_choice mapped to toolChoice
  • Error handling updated (RateLimitError → ThrottlingException, etc.)
  • No OpenAI-specific features remain (thread IDs, OpenAI(...) client, response_format)

Quick Reference

OpenAINova 2 Lite
openai SDKboto3 bedrock-runtime
client.chat.completions.create() / client.responses.create()client.converse()
OPENAI_API_KEYAWS IAM credentials
model="gpt-4o-mini"modelId="us.amazon.nova-2-lite-v1:0"
{"role": "system", "content": "..."}system=[{"text": "..."}]
{"content": "text"}{"content": [{"text": "text"}]}
max_tokens / temperature / top_pinferenceConfig.maxTokens / .temperature / .topP
tools=[{"type": "function", ...}]toolConfig={"tools": [{"toolSpec": ...}]}
tool_choicetoolChoice
response_format (JSON schema)Tool-forcing or inline prompt schema
reasoning_effort="high"additionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "high"}}
stream=Trueclient.converse_stream()
RateLimitError / APIErrorThrottlingException / ValidationException

Common Mistakes

Leaving the system prompt as a message

Problem: Keeping {"role": "system", ...} in the messages array — Bedrock does not accept a system role in messages. Fix: Extract it into the dedicated system=[{"text": ...}] parameter.

Forgetting to wrap content in typed blocks

Problem: Passing a flat string as message content ({"content": "hello"}) — Bedrock requires typed content blocks. Fix: Wrap as {"content": [{"text": "hello"}]}.

Leaving inference params at the top level

Problem: Passing max_tokens/temperature/top_p as top-level arguments to converse(). Fix: Nest them in inferenceConfig with camelCase (maxTokens, temperature, topP).

Passing inferenceConfig with high-effort reasoning

Problem: Including maxTokens, temperature, topP, or topK when maxReasoningEffort is high — returns a validation error. Fix: Remove the entire inferenceConfig block at high effort, and set the client read_timeout=3600.

Passing additionalModelRequestFields when reasoning is disabled

Problem: Including reasoning config when reasoning is not needed — adds cost and latency with no benefit. Fix: Omit additionalModelRequestFields entirely when reasoning is disabled.

Loose prompts carried over unchanged

Problem: Reusing a vague OpenAI prompt verbatim — Nova quality varies across requests. Fix: Add explicit ##Section## structure: task, input, format requirements, constraints.

Wrong media ordering / wrong image format

Problem: Putting text before images in the content array, or passing image URLs / base64 strings. Fix: Media content blocks MUST come before the text block, and images must be raw binary bytes.

From the aws-samples/amazon-nova-samples README

Amazon AI Samples

Home of Amazon first-party foundation models and AI services. This repository contains sample code, notebooks, workshops, and reference applications for building with Amazon first-party foundation models and AI services on Amazon Bedrock, Amazon SageMaker AI, and third-party platforms.

This repository was renamed from aws-samples/amazon-nova-samples. Existing links and git clone URLs redirect automatically. To update a local clone, run: git remote set-url origin https://github.com/aws-samples/amazon-ai-samples.git

Repository map

FolderWhat's insidePrimary services
multimodal-understanding/Getting-started notebooks, a self-paced workshop, repeatable patterns, and sample apps for Nova understanding models: text, image, video, and document understanding, tool calling, RAG, agents, and prompt optimizationAmazon Bedrock (Nova Lite, Pro, Premier, Nova 2 Lite)
speech-to-speech/Real-time, bidirectional voice conversation samples in Python, Java, Node.js, .NET, and Ruby, plus integration patterns, workshops, and a Nova Sonic 2.5 prompting guideAmazon Bedrock (Nova Sonic, Nova 2 Sonic, Nova Sonic 2.5)
text-to-speech/A guided quickstart, focused feature samples (SSML, speech marks, lexicons, async and bidirectional streaming synthesis, voice cloning), and end-to-end speech applicationsAmazon Polly, with Transcribe, Translate, Bedrock, and AgentCore in the use cases
multimodal-embeddings/Embedding text, images, video, audio, and documents, and patterns for semantic, multilingual, and visual search, clustering, and classificationAmazon Bedrock (Nova Multimodal Embeddings), Amazon S3 Vectors, OpenSearch Serverless
customization/Fine-tuning (SFT, PEFT, DPO), reinforcement fine-tuning (RFT), distillation, evaluation, and deployment of custom Nova models, plus HyperPod setup and utilitiesAmazon Bedrock, Amazon SageMaker AI (Training Jobs, HyperPod)
nova-act/Tutorials and use cases for building agents that take actions in web browsers: QA testing, adaptive UI testing, and price comparisonAmazon Nova Act, Amazon Bedrock AgentCore Browser
skills/Agent Skills and Claude Code plugins for AI coding assistants: Nova prompt optimization, migrating from OpenAI, Gemini, or Titan to Nova, and turning a text agent into a voice agentWorks with Claude Code, Kiro, and other Agent Skills–compatible tools

Where to start

I want to…Start here
Make my first call to a Nova modelmultimodal-understanding/getting-started/
Learn Nova models end to end in a guided workshopmultimodal-understanding/workshop/
Find a ready-made pattern (RAG, agents, IDP, citations, batch inference, …)multimodal-understanding/repeatable-patterns/
Build a real-time voice agentspeech-to-speech/amazon-nova-2-sonic/
Write prompts for Nova Sonic 2.5speech-to-speech/amazon-nova-2.5-sonic/
Convert text to natural-sounding speechtext-to-speech/getting-started/
Build semantic or multimodal searchmultimodal-embeddings/getting-started/
Fine-tune or distill a Nova modelcustomization/
Automate browser workflows with an agentnova-act/tutorials/path-to-production/
Migrate existing OpenAI, Gemini, or Titan code to Novaskills/

Each folder has its own README with prerequisites, setup steps, and a full index of its samples.

Highlights by folder

Multimodal understanding

  • Getting started: setup, the Converse API, built-in tool calling, and integrations with Strands Agents and LangChain.
  • Workshop: a three-part self-paced workshop: getting started with Nova 2, multimodal intelligence, and agentic workflows deployed to Amazon Bedrock AgentCore.
  • Repeatable patterns: task-focused guides covering document understanding and IDP, image grounding, video temporal reasoning, citations, prompt caching, LLM-as-a-judge, batch inference, and agents built with Strands, LangGraph, CrewAI, smolagents, and the OpenAI Agents SDK.
  • Sample apps and the Nova meta-prompter, which transforms prompts written for other models into Nova-optimized prompts.

Speech-to-speech (Nova Sonic)

Nova Sonic uses the InvokeModelWithBidirectionalStream API for low-latency voice conversations.

  • amazon-nova-2-sonic/: the current samples. Includes sample code (console Python, WebSocket in Java, Node.js, and .NET, and AgentCore), repeatable patterns (knowledge bases, session continuation, conversation transfer, chat-history and token-usage logging, customer service), and workshops (Python server, React client, LiveKit, AgentCore).
  • amazon-nova-2.5-sonic/: a getting-started and migration guide and a prompting guide for Nova Sonic 2.5.
  • The top-level sample-codes/, repeatable-patterns/, and workshops/ folders hold the original Nova Sonic samples.

Text-to-speech (Amazon Polly)

  • Getting started: a guided first request that covers Polly engines, voice discovery, and synthesis.
  • Features: eight focused examples: SynthesizeSpeech, DescribeVoices, SSML, speech marks, lexicons, asynchronous synthesis to S3, bidirectional streaming, and voice cloning.
  • Use cases: a cascading STT → LLM → TTS voice agent, a podcast generator, a live speech translator, a lip-synced 3D avatar, and a voice assistant for the Reachy Mini robot.
  • Skills: agent skills that help AI coding assistants work with these samples.

Multimodal embeddings

Numbered getting-started notebooks for each modality, and repeatable patterns for video search with S3 Vectors, multilingual search, clustering, and intent classification, visual product search, multimodal document search with LangChain and LlamaIndex, and industry examples.

Customization

Bedrock fine-tuning and distillation (text-to-SQL, understanding, Nova Canvas, citations, and function-calling recipes); SageMaker AI customization for Nova 1.0 and Nova 2.0 (data prep → SFT → RFT → evaluation → deployment); HyperPod cluster setup; and utilities such as a dataset validator, an FT-to-eval converter, and job monitoring. See the customization README for a use-case-to-folder map.

Nova Act

A path-to-production tutorial (setup, workflow basics, tool use) and use cases for agentic QA testing, adaptive UI testing, and price comparison, using Amazon Bedrock AgentCore Browser.

Skills and Claude Code plugins

The skills/ folder holds Agent Skills for AI coding assistants. Several are also published as Claude Code plugins through this repository's marketplace:

/plugin marketplace add aws-samples/amazon-ai-samples
/plugin install nova-prompting@aws-samples-amazon-nova-samples
PluginPurpose
nova-promptingPrompt optimization for Nova 1 and Nova 2 Lite (/nova1-prompt, /nova2-prompt)
nova-sonic25-promptingPrompt best practices for Nova Sonic 2.5 voice agents (/nova-sonic25-prompt)
openai-to-nova-migrationMigrate OpenAI code and prompts to Nova 2 Lite
gemini-to-nova-migrationMigrate Google Gemini code and prompts to Nova 2 Lite
titan-nova-mme-migrationMigrate Titan embedding code to Nova Multimodal Embeddings

The marketplace keeps its original identifier, aws-samples-amazon-nova-samples, so existing plugin installs keep working.

Prerequisites

  1. An AWS account and credentials configured for the AWS CLI or SDK (for example, with aws configure or an IAM role).
  2. A Region where the model or service you're using is available. Check the individual sample README for supported Regions and model IDs.
  3. Python 3.10 or later for most samples. Some samples use Java, Node.js, or .NET, or need a newer Python version; their READMEs say so.
  4. IAM permissions for the services the sample uses (see below).

IAM permissions

The AWS identity you use, whether it's an IAM user, an assumed role, or a SageMaker AI execution role, needs permission to call the services in the sample. For experimentation only, a policy like the one below covers the core Bedrock and Polly samples. For anything beyond experimentation, scope Action and Resource to what the sample actually needs.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "BedrockInvoke",
            "Effect": "Allow",
            "Action": ["bedrock:InvokeModel*"],
            "Resource": "*"
        },
        {
            "Sid": "PollySynthesis",
            "Effect": "Allow",
            "Action": ["polly:*"],
            "Resource": "*"
        }
    ]
}

Many samples need more than this, such as Amazon S3, Amazon Transcribe, Amazon Translate, Amazon SageMaker AI, OpenSearch Serverless, or Amazon Bedrock AgentCore. Each sample's README lists its own permissions.

⚠️ With Amazon SageMaker AI, the notebook execution role is usually separate from the role you use to sign in to the AWS Management Console. Grant permissions to both if you also want to use the console.

For fine-grained Bedrock permissions, see the Amazon Bedrock User Guide.

Costs

These samples are for demonstration and learning, and are not intended for production use as-is. Running them makes billed AWS API calls, and some samples deploy infrastructure (for example, Fargate, OpenSearch Serverless, HyperPod clusters, or training jobs) that keeps costing money until you delete it. Review each sample's README before running it, and follow its cleanup steps when you're done.

Contributing

We welcome community contributions. See CONTRIBUTING.md for guidelines.

Note: Please contact the repository maintainers before proposing new top-level folders or changes to them.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

👏 Contributors

Shout out to these awesome contributors:

image

Details

Marketplace
aws-samples/amazon-nova-samples
Source
skills/openai-to-nova-migration
Category
Community

More from aws-samples/amazon-nova-samples

All 6

Similar to openai-to-nova-migration

More LLM Integration