AWS Security ChangesHomeSearch

AWS bedrock documentation change

Service: bedrock · 2025-04-11 · Documentation low

File: bedrock/latest/userguide/bedrock-runtime_example_bedrock-runtime_Converse_Ai21LabsJurassic2_section.md

Summary

Removed JavaScript SDK code example for Converse API with AI21 Labs Jurassic-2 model

Security assessment

Change removes a code example without any security context. No security vulnerabilities or security features are mentioned in the removed content.

Diff

diff --git a/bedrock/latest/userguide/bedrock-runtime_example_bedrock-runtime_Converse_Ai21LabsJurassic2_section.md b/bedrock/latest/userguide/bedrock-runtime_example_bedrock-runtime_Converse_Ai21LabsJurassic2_section.md
index 570f165ed..b530fc1b2 100644
--- a//bedrock/latest/userguide/bedrock-runtime_example_bedrock-runtime_Converse_Ai21LabsJurassic2_section.md
+++ b//bedrock/latest/userguide/bedrock-runtime_example_bedrock-runtime_Converse_Ai21LabsJurassic2_section.md
@@ -242,63 +241,0 @@ Send a text message to AI21 Labs Jurassic-2, using Bedrock's Converse API with t
-JavaScript
-    
-
-**SDK for JavaScript (v3)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javascriptv3/example_code/bedrock-runtime#code-examples). 
-
-Send a text message to AI21 Labs Jurassic-2, using Bedrock's Converse API.
-    
-    
-    // Use the Conversation API to send a text message to AI21 Labs Jurassic-2.
-    
-    import {
-      BedrockRuntimeClient,
-      ConverseCommand,
-    } from "@aws-sdk/client-bedrock-runtime";
-    
-    // Create a Bedrock Runtime client in the AWS Region you want to use.
-    const client = new BedrockRuntimeClient({ region: "us-east-1" });
-    
-    // Set the model ID, e.g., Jurassic-2 Mid.
-    const modelId = "ai21.j2-mid-v1";
-    
-    // Start a conversation with the user message.
-    const userMessage =
-      "Describe the purpose of a 'hello world' program in one line.";
-    const conversation = [
-      {
-        role: "user",
-        content: [{ text: userMessage }],
-      },
-    ];
-    
-    // Create a command with the model ID, the message, and a basic configuration.
-    const command = new ConverseCommand({
-      modelId,
-      messages: conversation,
-      inferenceConfig: { maxTokens: 512, temperature: 0.5, topP: 0.9 },
-    });
-    
-    try {
-      // Send the command to the model and wait for the response
-      const response = await client.send(command);
-    
-      // Extract and print the response text.
-      const responseText = response.output.message.content[0].text;
-      console.log(responseText);
-    } catch (err) {
-      console.log(`ERROR: Can't invoke '${modelId}'. Reason: ${err}`);
-      process.exit(1);
-    }
-    
-    
-    
-
-  * For API details, see [Converse](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-runtime/command/ConverseCommand) in _AWS SDK for JavaScript API Reference_. 
-
-
-
-