AWS bedrock documentation change
Summary
Restructured inference documentation with added IAM policy requirements for bedrock-mantle and bedrock-runtime endpoints, updated topic organization, and removed modality table
Security assessment
Added detailed IAM policies for model invocation permissions but shows no evidence of addressing a specific vulnerability. Documents security controls for API access
Diff
diff --git a/bedrock/latest/userguide/inference.md b/bedrock/latest/userguide/inference.md index 916fee042..cd35b8e33 100644 --- a//bedrock/latest/userguide/inference.md +++ b//bedrock/latest/userguide/inference.md @@ -7 +7,59 @@ -# Submit prompts and generate responses with model inference +# Making inference requests + +Inference is the process of generating an output from an input provided to a model. Before you can send an inference request to Amazon Bedrock, you need to allow your role to perform the model invocation API actions. This depends on the endpoint you are using. + +**`bedrock-mantle` endpoint** + +If your role has the `AmazonBedrockMantleInferenceAccess` AWS managed policy attached, you can skip this section. Otherwise, attach the following permissions to allow inference via the `bedrock-mantle` endpoint (Responses API, Chat Completions, Messages API): + + + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "MantleInferencePermissions", + "Effect": "Allow", + "Action": [ + "bedrock-mantle:CreateInference", + "bedrock-mantle:GetProject", + "bedrock-mantle:ListProjects", + "bedrock-mantle:ListTagsForResources" + ], + "Resource": "*" + } + ] + } + +**`bedrock-runtime` endpoint** + +If your role has the [AmazonBedrockFullAccess](./security-iam-awsmanpol.html#security-iam-awsmanpol-AmazonBedrockFullAccess) AWS managed policy attached, you can skip this section. Otherwise, attach the following permissions to allow inference via the `bedrock-runtime` endpoint (Converse and Invoke APIs): + + + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "ModelInvocationPermissions", + "Effect": "Allow", + "Action": [ + "bedrock:InvokeModel", + "bedrock:InvokeModelWithResponseStream", + "bedrock:GetInferenceProfile", + "bedrock:ListInferenceProfiles", + "bedrock:RenderPrompt", + "bedrock:GetCustomModel", + "bedrock:ListCustomModels", + "bedrock:GetImportedModel", + "bedrock:ListImportedModels", + "bedrock:GetProvisionedModelThroughput", + "bedrock:ListProvisionedModelThroughputs", + "bedrock:GetGuardrail", + "bedrock:ListGuardrails", + "bedrock:ApplyGuardrail" + ], + "Resource": "*" + } + ] + } + +For a detailed breakdown of each permission, see [Prerequisites for running model inference](./inference-prereq.html). @@ -9 +67 @@ -Inference refers to the process of generating an output from an input provided to a model. +###### Topics @@ -11 +69 @@ Inference refers to the process of generating an output from an input provided t -Amazon Bedrock offers a suite of foundation models that you can use to generate outputs of the following modalities. To see modality support by foundation model, refer to [Supported foundation models in Amazon Bedrock](./models-supported.html). + * [Inference using Responses API](./bedrock-mantle.html) @@ -13,6 +71 @@ Amazon Bedrock offers a suite of foundation models that you can use to generate -Output modality | Description | Example use cases ----|---|--- -Text | Provide text input and generate various types of text | Chat, question-and-answering, brainstorming, summarization, code generation, table creation, data formatting, rewriting -Image | Provide text or input images and generate or modify images | Image generation, image editing, image variation -Video | Provide text or reference images and generate a video | Video generation, image conversion to video -Embeddings | Provide text, images, or both text and images and generate a vector of numeric values that represent the input. The output vector can be compared to other embeddings vectors to determine semantic similarity (for text) or visual similarity (for images). | Text and image search, query, categorization, recommendations, personalization, [knowledge base creation](./knowledge-base.html) + * [Inference using Chat Completions API](./inference-chat-completions-mantle.html) @@ -20 +73 @@ Embeddings | Provide text, images, or both text and images and generate a vector -###### Topics + * [Inference using Anthropic Messages API](./inference-messages-api.html) @@ -22 +75 @@ Embeddings | Provide text, images, or both text and images and generate a vector - * [Learn about use cases for different model inference methods](./inference-methods.html) + * [Inference using Invoke API](./inference-api.html) @@ -24 +77 @@ Embeddings | Provide text, images, or both text and images and generate a vector - * [How inference works in Amazon Bedrock](./inference-how.html) + * [Inference using Converse API](./conversation-inference.html) @@ -28,5 +81 @@ Embeddings | Provide text, images, or both text and images and generate a vector - * [Supported Regions and models for running model inference](./inference-supported.html) - - * [Prerequisites for running model inference](./inference-prereq.html) - - * [Generate responses in the console using playgrounds](./playgrounds.html) + * [Get validated JSON results from models](./structured-output.html) @@ -38,7 +87 @@ Embeddings | Provide text, images, or both text and images and generate a vector - * [Generate responses using OpenAI APIs](./bedrock-mantle.html) - - * [Submit prompts and generate responses using the API](./inference-api.html) - - * [Get validated JSON results from models](./structured-output.html) - - * [Use a computer use tool to complete an Amazon Bedrock model response](./computer-use.html) + * [Supported Regions and models for running model inference](./inference-supported.html) @@ -55 +98 @@ To use the Amazon Web Services Documentation, Javascript must be enabled. Please -Control permissions +APIs @@ -57 +100 @@ Control permissions -Different inference methods +Inference using Responses API