AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-04-28 · Documentation low

File: code-library/latest/ug/bash_2_iam_code_examples.md

Summary

Fixed broken Wait command link and added shared bucket detection/cleanup logic

Security assessment

Operational improvements for resource sharing without security implications. Prevents accidental bucket deletion but doesn't address vulnerabilities

Diff

diff --git a/code-library/latest/ug/bash_2_iam_code_examples.md b/code-library/latest/ug/bash_2_iam_code_examples.md
index abc7da5d6..53ef5a3ee 100644
--- a//code-library/latest/ug/bash_2_iam_code_examples.md
+++ b//code-library/latest/ug/bash_2_iam_code_examples.md
@@ -5124 +5124 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    * [Wait](https://docs.aws.amazon.com/goto/aws-cli/ecs-2014-11-13/Wait)
+    * [Wait](https://docs.aws.amazon.com/goto/aws-cli/iam-2010-05-08/Wait)
@@ -9495,0 +9496,9 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    # Check for shared prereq bucket
+    PREREQ_BUCKET=$(aws cloudformation describe-stacks --stack-name tutorial-prereqs-bucket \
+        --query 'Stacks[0].Outputs[?OutputKey==`BucketName`].OutputValue' --output text 2>/dev/null)
+    if [ -n "$PREREQ_BUCKET" ] && [ "$PREREQ_BUCKET" != "None" ]; then
+        S3_BUCKET_NAME="$PREREQ_BUCKET"
+        BUCKET_IS_SHARED=true
+        echo "Using shared bucket: $S3_BUCKET_NAME"
+    else
+        BUCKET_IS_SHARED=false
@@ -9496,0 +9506 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    fi
@@ -9937,0 +9948 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            if [ "$BUCKET_IS_SHARED" = "false" ]; then
@@ -9939,0 +9951 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+        fi
@@ -9977,0 +9990,9 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    # Check for shared prereq bucket
+    PREREQ_BUCKET=$(aws cloudformation describe-stacks --stack-name tutorial-prereqs-bucket \
+        --query 'Stacks[0].Outputs[?OutputKey==`BucketName`].OutputValue' --output text 2>/dev/null)
+    if [ -n "$PREREQ_BUCKET" ] && [ "$PREREQ_BUCKET" != "None" ]; then
+        S3_BUCKET_NAME="$PREREQ_BUCKET"
+        BUCKET_IS_SHARED=true
+        echo "Using shared bucket: $S3_BUCKET_NAME"
+    else
+        BUCKET_IS_SHARED=false
@@ -9978,0 +10000 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    fi