AWS Security ChangesHomeSearch

AWS AWSCloudFormation documentation change

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

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

Summary

Updated example template to show proper ThingPrincipalAttachment configuration with parameter reference and certificate ARN

Security assessment

Improves documentation about secure principal attachment configuration but doesn't address specific vulnerabilities

Diff

diff --git a/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.md b/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.md
index cd9836804..57fbe7a79 100644
--- a//AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.md
+++ b//AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingprincipalattachment.md
@@ -69,6 +69,20 @@ The following example attaches a principal to a thing.
-    { "AWSTemplateFormatVersion": "2010-09-09", "Resources": {
-                "MyTopicRule": { "Type": "AWS::IoT::TopicRule", "Properties": { "RuleName": { "Ref":
-                "NameParameter" }, "TopicRulePayload": { "RuleDisabled": "true", "Sql": "SELECT temp
-                FROM 'SomeTopic' WHERE temp > 60", "Actions": [ { "S3": { "BucketName": { "Ref":
-                "amzn-s3-demo-bucket" }, "RoleArn": { "Fn::GetAtt": [ "MyRole", "Arn" ] }, "Key": "MyKey.txt" } } ]
-                } } } } }
+    {
+      "AWSTemplateFormatVersion": "2010-09-09",
+      "Parameters": {
+        "NameParameter": {
+          "Type": "String",
+          "Description": "Name of the IoT Thing to attach the principal to"
+        }
+      },
+      "Resources": {
+        "MyThingPrincipalAttachment": {
+          "Type": "AWS::IoT::ThingPrincipalAttachment",
+          "Properties": {
+            "ThingName": {
+              "Ref": "NameParameter"
+            },
+            "Principal": "arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2"
+          }
+        }
+      }
+    }
@@ -79,5 +93,12 @@ The following example attaches a principal to a thing.
-     AWSTemplateFormatVersion: '2010-09-09' Resources:
-                MyThingPrincipalAttachment: Type: AWS::IoT::ThingPrincipalAttachment Properties:
-                ThingName: Ref: NameParameter Principal:
-                arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2
-                Parameters: NameParameter: Type: String 
+    AWSTemplateFormatVersion: '2010-09-09'
+    Resources:
+      MyThingPrincipalAttachment:
+        Type: AWS::IoT::ThingPrincipalAttachment
+        Properties:
+          ThingName:
+            Ref: NameParameter
+          Principal: arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2
+    
+    Parameters:
+      NameParameter:
+        Type: String