AWS Security ChangesHomeSearch

AWS bedrock documentation change

Service: bedrock · 2026-05-04 · Documentation low

File: bedrock/latest/userguide/getting-started.md

Summary

Updated API examples and installation instructions by swapping 'Responses/Chat Completions API' and 'Messages API' sections, changed required libraries from openai to anthropic (and vice versa), updated model versions from Claude Opus 4-6 to 4-7, and restructured code samples.

Security assessment

The changes involve routine updates to API examples, library dependencies, and model versions without any mention of vulnerabilities, security patches, or security configurations. No evidence of security fixes or threat mitigation.

Diff

diff --git a/bedrock/latest/userguide/getting-started.md b/bedrock/latest/userguide/getting-started.md
index 56461404f..ea6b667e7 100644
--- a//bedrock/latest/userguide/getting-started.md
+++ b//bedrock/latest/userguide/getting-started.md
@@ -17 +17 @@ In this section, we will show you how to get started with Amazon Bedrock within
-Responses/Chat Completions API
+Messages API
@@ -21 +21 @@ Responses/Chat Completions API
-    pip install boto3 openai
+    pip install boto3 anthropic
@@ -23 +23 @@ Responses/Chat Completions API
-Messages API
+Responses/Chat Completions API
@@ -27 +27 @@ Messages API
-    pip install boto3 anthropic
+    pip install boto3 openai
@@ -37 +37 @@ Invoke/Converse API
-Responses/Chat Completions API
+Messages API
@@ -41,2 +41,2 @@ Responses/Chat Completions API
-    OPENAI_API_KEY="<provide your Bedrock API key>"
-    OPENAI_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/v1"
+    ANTHROPIC_API_KEY="<provide your Bedrock API key>"
+    ANTHROPIC_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/anthropic"
@@ -44 +44 @@ Responses/Chat Completions API
-Messages API
+Responses/Chat Completions API
@@ -48,2 +48,2 @@ Messages API
-    ANTHROPIC_API_KEY="<provide your Bedrock API key>"
-    ANTHROPIC_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/anthropic"
+    OPENAI_API_KEY="<provide your Bedrock API key>"
+    OPENAI_BASE_URL="https://bedrock-mantle.<your-region>.api.aws/v1"
@@ -58,0 +59,15 @@ Invoke/Converse API
+Messages API
+    
+    
+    
+    import anthropic
+    
+    client = anthropic.Anthropic()
+    
+    response = client.messages.create(
+        model="anthropic.claude-opus-4-7",
+        max_tokens=1024,
+        messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}]
+    )
+    print(response)
+
@@ -87 +102 @@ Chat Completions API
-Messages API
+Converse API
@@ -91,3 +106 @@ Messages API
-    import anthropic
-    
-    client = anthropic.Anthropic()
+    import boto3
@@ -95,4 +108,9 @@ Messages API
-    response = client.messages.create(
-        model="anthropic.claude-opus-4-7",
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}]
+    client = boto3.client('bedrock-runtime', region_name='us-east-1')
+    response = client.converse(
+        modelId='anthropic.claude-opus-4-7',
+        messages=[
+            {
+                'role': 'user',
+                'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}]
+            }
+        ]
@@ -111 +129 @@ Invoke API
-        modelId='anthropic.claude-opus-4-6-v1',
+        modelId='anthropic.claude-opus-4-7',
@@ -120,18 +137,0 @@ Invoke API
-Converse API
-    
-    
-    
-    import boto3
-    
-    client = boto3.client('bedrock-runtime', region_name='us-east-1')
-    response = client.converse(
-        modelId='anthropic.claude-opus-4-6-v1',
-        messages=[
-            {
-                'role': 'user',
-                'content': [{'text': 'Can you explain the features of Amazon Bedrock?'}]
-            }
-        ]
-    )
-    print(response)
-