AWS Security ChangesHomeSearch

AWS bedrock-agentcore documentation change

Service: bedrock-agentcore · 2026-03-04 · Documentation low

File: bedrock-agentcore/latest/devguide/runtime-get-started-toolkit-typescript.md

Summary

Updated Step 9 to include 'Stop session' functionality with code example for stopping runtime sessions via SDK to prevent runaway costs

Security assessment

Added documentation focuses on cost control through session management rather than addressing security vulnerabilities. No evidence of security vulnerability patching.

Diff

diff --git a/bedrock-agentcore/latest/devguide/runtime-get-started-toolkit-typescript.md b/bedrock-agentcore/latest/devguide/runtime-get-started-toolkit-typescript.md
index c03a025fa..52414df1b 100644
--- a//bedrock-agentcore/latest/devguide/runtime-get-started-toolkit-typescript.md
+++ b//bedrock-agentcore/latest/devguide/runtime-get-started-toolkit-typescript.md
@@ -5 +5 @@
-PrerequisitesStep 1: Set up project and install dependenciesStep 2: Create your agent projectStep 3: Configure your agentStep 4: Test your agent locallyStep 5: Enable observability for your agentStep 6: Deploy to Amazon Bedrock AgentCore RuntimeStep 7: Test your deployed agentStep 8: Invoke your agent programmaticallyStep 9: Clean upFind your resourcesCommon issues and solutionsAdvanced: Streaming responses
+PrerequisitesStep 1: Set up project and install dependenciesStep 2: Create your agent projectStep 3: Configure your agentStep 4: Test your agent locallyStep 5: Enable observability for your agentStep 6: Deploy to Amazon Bedrock AgentCore RuntimeStep 7: Test your deployed agentStep 8: Invoke your agent programmaticallyStep 9: Stop session or clean upFind your resourcesCommon issues and solutionsAdvanced: Streaming responses
@@ -35 +35 @@ For information about the HTTP protocol that the agent uses, see [HTTP protocol
-  * Step 9: Clean up
+  * Step 9: Stop session or clean up
@@ -310 +310,30 @@ If you plan on integrating your agent with OAuth, you can't use the AWS SDK to c
-## Step 9: Clean up
+## Step 9: Stop session or clean up
+
+To stop the running session before the configurable `IdleRuntimeSessionTimeout` (defaulted at 15 minutes) and save on any potential runaway costs, execute: `StopRuntimeSession`
+
+Create a file named `stop-runtime-session.ts` with the following content:
+
+###### Example
+    
+    
+    import {
+      BedrockAgentCoreClient,
+      StopRuntimeSessionCommand
+    } from '@aws-sdk/client-bedrock-agentcore';
+    
+    const client = new BedrockAgentCoreClient({ region: 'us-west-2' });
+    const agentArn = 'Agent ARN';
+    const command = new StopRuntimeSessionCommand({
+      agentRuntimeArn: agentArn,
+      runtimeSessionId: randomUUID(),
+      qualifier: 'DEFAULT',
+    });
+    
+    const response = await client.send(command);
+    console.log('Session stopped:', response);
+                
+
+Run the code with the following command:
+    
+    
+    npx tsx stop-runtime-session.ts