Skip to content

Commit 9730eff

Browse files
authored
Delete .bedrock_agentcore.yaml file during clean up (#1318)
* Delete .bedrock_agentcore.yaml file during clean up to allow for consequtive notebook executions * Remove -rf from !rm command
1 parent d4b3f63 commit 9730eff

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

01-tutorials/01-AgentCore-runtime/01-hosting-agent/01-strands-with-bedrock-model/runtime_with_strands_and_bedrock_models.ipynb

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@
4848
{
4949
"cell_type": "markdown",
5050
"id": "3a676f58ecf52b42",
51-
"metadata": {},
51+
"metadata": {
52+
"editable": true,
53+
"slideshow": {
54+
"slide_type": ""
55+
},
56+
"tags": []
57+
},
5258
"source": [
5359
"## Prerequisites\n",
5460
"\n",
@@ -686,7 +692,14 @@
686692
" )\n",
687693
" print(f\"✅ Second ECR repository '{launch_result_short.ecr_uri.split('/')[1]}' deleted\")\n",
688694
" except Exception as e:\n",
689-
" print(f\"⚠️ Failed to delete second ECR repository: {e}\")"
695+
" print(f\"⚠️ Failed to delete second ECR repository: {e}\")\n",
696+
"\n",
697+
"# --- Delete local file to allow for consequtive executions of the notebook ---\n",
698+
"try:\n",
699+
" !rm .bedrock_agentcore.yaml\n",
700+
" print(f\"✅ .bedrock_agentcore.yaml deleted\")\n",
701+
"except Exception as e:\n",
702+
" print(f\"⚠️ Failed to delete .bedrock_agentcore.yaml: {e}\")"
690703
]
691704
},
692705
{

0 commit comments

Comments
 (0)