From edab24dc15be9326edc012cb8708ade94eda74ac Mon Sep 17 00:00:00 2001 From: ktzouvanaws Date: Sat, 11 Apr 2026 18:05:55 +0000 Subject: [PATCH] Delete .bedrock_agentcore.yaml file during clean up to allow for consequtive notebook executions --- ...untime_with_strands_and_bedrock_models.ipynb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/01-tutorials/01-AgentCore-runtime/01-hosting-agent/01-strands-with-bedrock-model/runtime_with_strands_and_bedrock_models.ipynb b/01-tutorials/01-AgentCore-runtime/01-hosting-agent/01-strands-with-bedrock-model/runtime_with_strands_and_bedrock_models.ipynb index e0210f807..b45537c71 100644 --- a/01-tutorials/01-AgentCore-runtime/01-hosting-agent/01-strands-with-bedrock-model/runtime_with_strands_and_bedrock_models.ipynb +++ b/01-tutorials/01-AgentCore-runtime/01-hosting-agent/01-strands-with-bedrock-model/runtime_with_strands_and_bedrock_models.ipynb @@ -48,7 +48,13 @@ { "cell_type": "markdown", "id": "3a676f58ecf52b42", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "source": [ "## Prerequisites\n", "\n", @@ -686,7 +692,14 @@ " )\n", " print(f\"✅ Second ECR repository '{launch_result_short.ecr_uri.split('/')[1]}' deleted\")\n", " except Exception as e:\n", - " print(f\"⚠️ Failed to delete second ECR repository: {e}\")" + " print(f\"⚠️ Failed to delete second ECR repository: {e}\")\n", + "\n", + "# --- Delete local file to allow for consequtive executions of the notebook ---\n", + "try:\n", + " !rm -rf .bedrock_agentcore.yaml\n", + " print(f\"✅ .bedrock_agentcore.yaml deleted\")\n", + "except Exception as e:\n", + " print(f\"⚠️ Failed to delete .bedrock_agentcore.yaml: {e}\")" ] }, {