AWS Security ChangesHomeSearch

AWS bedrock documentation change

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

File: bedrock/latest/userguide/inference-invoke.md

Summary

Entire content of the page replaced with redirection notice indicating content moved to other pages

Security assessment

The change removes all technical content and replaces it with relocation notices. There are no security fixes, vulnerability disclosures, or new security documentation added. This appears to be routine documentation reorganization without security implications.

Diff

diff --git a/bedrock/latest/userguide/inference-invoke.md b/bedrock/latest/userguide/inference-invoke.md
index da8928940..129148e21 100644
--- a//bedrock/latest/userguide/inference-invoke.md
+++ b//bedrock/latest/userguide/inference-invoke.md
@@ -7 +7 @@
-Invoke model code examplesInvoke model with streaming code example
+# Submit a single prompt with InvokeModel (moved)
@@ -9,1024 +9 @@ Invoke model code examplesInvoke model with streaming code example
-# Submit a single prompt with InvokeModel
-
-You run inference on a single prompt by using the [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) and [InvokeModelWithResponseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html) API operations and specifying a model. Amazon Bedrock models differ in whether they accept text, image, or video inputs and whether they can produce outputs of text, image, or embeddings. Some models can return the response in a stream. To check model support for input, output, and streaming support, do one of the following:
-
-  * Check the value in the **Input modalities** , **Output modalities** , or **Streaming supported** columns for a model at [Supported foundation models in Amazon Bedrock](./models-supported.html).
-
-  * Send a [GetFoundationModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html) request with the model ID and check the values in the `inputModalities`, `outputModalities`, and `responseStreamingSupported` field.
-
-
-
-
-Run model inference on a prompt by sending an [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) or [InvokeModelWithResponseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html) request with an [Amazon Bedrock runtime endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#br-rt).
-
-###### Note
-
-Restrictions apply to the following operations: `InvokeModel`, `InvokeModelWithResponseStream`, `Converse`, and `ConverseStream`. See [API restrictions](./inference-api-restrictions.html) for details.
-
-The following fields are required:
-
-Field | Use case  
----|---  
-modelId | To specify the model, inference profile, or prompt from Prompt management to use. To learn how to find this value, see [Submit prompts and generate responses using the API](./inference-api.html).  
-body | To specify the inference parameters for a model. To see inference parameters for different models, see [Inference request parameters and response fields for foundation models](./model-parameters.html). If you specify a prompt from Prompt management in the `modelId` field, omit this field (if you include it, it will be ignored).  
-  
-The following fields are optional:
-
-Field | Use case  
----|---  
-accept | To specify the media type for the request body. For more information, see **Media Types** on the [Swagger website](https://swagger.io/specification/).  
-contentType | To specify the media type for the response body. For more information, see **Media Types** on the [Swagger website](https://swagger.io/specification/).  
-performanceConfigLatency | To specify whether to optimize a model for latency. For more information, see [Optimize model inference for latency](./latency-optimized-inference.html).  
-guardrailIdentifier | To specify a guardrail to apply to the prompt and response. For more information, see [Test your guardrail](./guardrails-test.html).  
-guardrailVersion | To specify a guardrail to apply to the prompt and response. For more information, see [Test your guardrail](./guardrails-test.html).  
-trace | To specify whether to return the trace for the guardrail you specify. For more information, see [Test your guardrail](./guardrails-test.html).  
-serviceTier | To specify the service tier for a request. For more information, see [Service tiers for optimizing performance and cost](./service-tiers-inference.html).  
-  
-## Invoke model code examples
-
-This topic provides some basic examples for running inference using a single prompt with the [InvokeModel](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html) API. For more examples with different models, visit the following resources:
-
-  * Pick an example under the [Code examples for Amazon Bedrock Runtime using AWS SDKs](./service_code_examples_bedrock-runtime.html) topic.
-
-  * Visit the inference parameter reference for the desired model at [Inference request parameters and response fields for foundation models](./model-parameters.html).
-
-
-
-
-The following examples assume that you've set up programmatic access such that you automatically authenticate to the AWS CLI and the SDK for Python (Boto3) in a default AWS Region when you run these examples. For information on setting up programmating access, see [Get started with the API](./getting-started-api.html).
-
-###### Note
-
-Review the following points before trying out the examples:
-
-  * You should test these examples in US East (N. Virginia) (us-east-1), which supports all the models used in the examples.
-
-  * The `body` parameter can be large, so for some CLI examples, you'll be asked to create a JSON file and provide that file into the `--body` argument instead of specifying it in the command line.
-
-  * For the image and video examples, you'll be asked to use your own image and video. The examples assume that your image file is named `image.png` and that your video file is named `video.mp4`.
-
-  * You might have to convert images or videos into a base64-encoded string or upload them to an Amazon S3 location. In the examples, you'll have to replace the placeholders with the actual base64-encoded string or S3 location.
-
-
-
-
-Expand a section to try some basic code examples.
-
-The following examples generate a text response to a text prompt using the Amazon Titan Text Premier model. Choose the tab for your preferred method, and then follow the steps:
-
-CLI
-    
-
-Run the following command in a terminal and find the generated response in a file called `invoke-model-output.txt`.
-    
-    
-    aws bedrock-runtime invoke-model \
-        --model-id amazon.titan-text-premier-v1:0 \
-        --body '{
-            "inputText": "Describe the purpose of a 'hello world' program in one line.",
-            "textGenerationConfig": {
-                "maxTokenCount": 512,
-                "temperature": 0.5
-            }
-        }' \
-        --cli-binary-format raw-in-base64-out \
-        invoke-model-output.txt
-
-Python
-    
-
-Run the following Python code example to generate a text response:
-    
-    
-    # Use the native inference API to send a text message to Amazon Titan Text.
-    
-    import boto3
-    import json
-    
-    from botocore.exceptions import ClientError
-    
-    # Create a Bedrock Runtime client in the AWS Region of your choice.
-    client = boto3.client("bedrock-runtime", region_name="us-east-1")
-    
-    # Set the model ID, e.g., Titan Text Premier.
-    model_id = "amazon.titan-text-premier-v1:0"
-    
-    # Define the prompt for the model.
-    prompt = "Describe the purpose of a 'hello world' program in one line."
-    
-    # Format the request payload using the model's native structure.
-    native_request = {
-        "inputText": prompt,
-        "textGenerationConfig": {
-            "maxTokenCount": 512,
-            "temperature": 0.5,
-        },
-    }
-    
-    # Convert the native request to JSON.
-    request = json.dumps(native_request)
-    
-    try:
-        # Invoke the model with the request.
-        response = client.invoke_model(modelId=model_id, body=request)
-    
-    except (ClientError, Exception) as e:
-        print(f"ERROR: Can't invoke '{model_id}'. Reason: {e}")
-        exit(1)
-    
-    # Decode the response body.
-    model_response = json.loads(response["body"].read())
-    
-    # Extract and print the response text.
-    response_text = model_response["results"][0]["outputText"]
-    print(response_text)
-    
-    
-
-The following examples generate a text response to a text prompt using the OpenAI GPT model with a service tier to prioritize the request. Choose the tab for your preferred method, and then follow the steps:
-
-CLI
-    
-
-Run the following command in a terminal and validate the service tier in the response.
-    
-    
-    aws bedrock-runtime invoke-model \
-        --model-id openai.gpt-oss-120b-1:0 \
-        --body '{
-            "messages": [
-                {
-                    "role": "user",
-                    "content": "Describe the purpose of a '\''hello world'\'' program in one line."
-                }
-            ],
-            "max_tokens": 512,
-            "temperature": 0.7
-        }' \
-        --content-type application/json \
-        --accept application/json \
-        --service-tier priority \
-        --cli-binary-format raw-in-base64-out
-
-Python
-    
-
-Run the following Python code example to generate a text response with service tier:
-    
-    
-    import boto3
-    import json
-    
-    # Create a Bedrock Runtime client
-    bedrock_runtime = boto3.client(
-        service_name="bedrock-runtime",
-        region_name="us-east-1"
-    )
-    
-    # Define the model ID and request body
-    model_id = "openai.gpt-oss-120b-1:0"
-    body = json.dumps({
-        "messages": [
-            {
-                "role": "user",
-                "content": "Describe the purpose of a 'hello world' program in one line."
-            }
-        ],
-        "max_tokens": 512,
-        "temperature": 0.7
-    })
-    
-    # Make the request with service tier
-    response = bedrock_runtime.invoke_model(