AWS Security ChangesHomeSearch

AWS bedrock documentation change

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

File: bedrock/latest/userguide/model-card-stability-ai-stable-image-remove-background.md

Summary

Updated API invocation example to use base64-encoded image input instead of text prompt

Security assessment

Change fixes incorrect code sample for image processing model. No security implications identified.

Diff

diff --git a/bedrock/latest/userguide/model-card-stability-ai-stable-image-remove-background.md b/bedrock/latest/userguide/model-card-stability-ai-stable-image-remove-background.md
index 7315dd30b..307998edf 100644
--- a//bedrock/latest/userguide/model-card-stability-ai-stable-image-remove-background.md
+++ b//bedrock/latest/userguide/model-card-stability-ai-stable-image-remove-background.md
@@ -134,0 +135 @@ Invoke API
+    import base64
@@ -137,0 +139,3 @@ Invoke API
+    with open('input.png', 'rb') as f:
+        image_base64 = base64.b64encode(f.read()).decode('utf-8')
+    params = {'image': image_base64}
@@ -140,4 +144 @@ Invoke API
-        body=json.dumps({
-                'messages': [{ 'role': 'user', 'content': 'Can you explain the features of Amazon Bedrock?'}],
-                'max_tokens': 1024
-        })
+        body=json.dumps(params)
@@ -145 +146,2 @@ Invoke API
-     print(json.loads(response['body'].read()))
+    response_body = json.loads(response['body'].read())
+    print(f'Image generated: {len(response_body["images"][0])} bytes (base64)')