AWS Security ChangesHomeSearch

AWS AWSCloudFormation documentation change

Service: AWSCloudFormation · 2025-04-11 · Documentation low

File: AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.md

Summary

Reformatted JSON and YAML examples for PolicyPrincipalAttachment with proper syntax formatting

Security assessment

Changes only improve code example formatting. The policy attachment mechanics remain unchanged with no security-specific context added.

Diff

diff --git a/AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.md b/AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.md
index 0685354fb..45bee06c2 100644
--- a//AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.md
+++ b//AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.md
@@ -69,3 +69,9 @@ The following example attaches a policy to a principal.
-     { "AWSTemplateFormatVersion":"2010-09-09", "Resources":{
-                "MyPolicyPrincipalAttachment":{ "Type":"AWS::IoT::PolicyPrincipalAttachment",
-                "Properties":{ "PolicyName":{ "Ref":"NameParameter" },
+    {
+      "AWSTemplateFormatVersion": "2010-09-09",
+      "Resources": {
+        "MyPolicyPrincipalAttachment": {
+          "Type": "AWS::IoT::PolicyPrincipalAttachment",
+          "Properties": {
+            "PolicyName": {
+              "Ref": "NameParameter"
+            },
@@ -73 +79,9 @@ The following example attaches a policy to a principal.
-                } } }, "Parameters":{ "NameParameter":{ "Type":"String" } } } 
+          }
+        }
+      },
+      "Parameters": {
+        "NameParameter": {
+          "Type": "String"
+        }
+      }
+    }
@@ -78,5 +92,12 @@ The following example attaches a policy to a principal.
-     AWSTemplateFormatVersion: '2010-09-09' Resources:
-                MyPolicyPrincipalAttachment: Type: AWS::IoT::PolicyPrincipalAttachment Properties:
-                PolicyName: Ref: NameParameter Principal:
-                arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2
-                Parameters: NameParameter: Type: String 
+    AWSTemplateFormatVersion: '2010-09-09'
+    Resources:
+      MyPolicyPrincipalAttachment:
+        Type: AWS::IoT::PolicyPrincipalAttachment
+        Properties:
+          PolicyName:
+            Ref: NameParameter
+          Principal: arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2
+    
+    Parameters:
+      NameParameter:
+        Type: String