Skip to content

StopCodeInterpreterSession

Source: src/AWS/BedrockAgentCore/StopCodeInterpreterSession.ts

Stops a running code interpreter session.

Bind a CodeInterpreter inside a function runtime to end sessions opened with StartCodeInterpreterSession and release the sandbox. Provide AgentCore.StopCodeInterpreterSessionHttp on the Function effect to implement the binding.

// init
const stopSession = yield* AgentCore.StopCodeInterpreterSession(interpreter);
// runtime (inside the handler)
yield* stopSession({ sessionId: session.sessionId });