AWS Security ChangesHomeSearch

AWS IAM documentation change

Service: IAM · 2025-07-18 · Documentation low

File: IAM/latest/UserGuide/iam_example_iam_CreatePolicy_section.md

Summary

Reformatted Kotlin code example to use multiline string syntax for IAM policy document

Security assessment

Code style improvement with no functional changes or security implications. The actual policy permissions remain unchanged.

Diff

diff --git a/IAM/latest/UserGuide/iam_example_iam_CreatePolicy_section.md b/IAM/latest/UserGuide/iam_example_iam_CreatePolicy_section.md
index efce7a78e..bda3a519e 100644
--- a//IAM/latest/UserGuide/iam_example_iam_CreatePolicy_section.md
+++ b//IAM/latest/UserGuide/iam_example_iam_CreatePolicy_section.md
@@ -721,17 +721,18 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-        val policyDocumentVal =
-            "{" +
-                "  \"Version\": \"2012-10-17\"," +
-                "  \"Statement\": [" +
-                "    {" +
-                "        \"Effect\": \"Allow\"," +
-                "        \"Action\": [" +
-                "            \"dynamodb:DeleteItem\"," +
-                "            \"dynamodb:GetItem\"," +
-                "            \"dynamodb:PutItem\"," +
-                "            \"dynamodb:Scan\"," +
-                "            \"dynamodb:UpdateItem\"" +
-                "       ]," +
-                "       \"Resource\": \"*\"" +
-                "    }" +
-                "   ]" +
-                "}"
+        val policyDocumentVal = """
+        {
+            "Version": "2012-10-17",
+            "Statement": [
+                {
+                    "Effect": "Allow",
+                    "Action": [
+                        "dynamodb:DeleteItem",
+                        "dynamodb:GetItem",
+                        "dynamodb:PutItem",
+                        "dynamodb:Scan",
+                        "dynamodb:UpdateItem"
+                    ],
+                    "Resource": "*"
+                }
+            ]
+        }
+        """.trimIndent()
@@ -745 +746 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-        IamClient { region = "AWS_GLOBAL" }.use { iamClient ->
+        IamClient.fromEnvironment { region = "AWS_GLOBAL" }.use { iamClient ->