AWS eventbridge documentation change
Summary
Reformatted IAM policy examples with proper JSON structure and updated resource names
Security assessment
Changes improve policy readability but don't alter security semantics. Updates to resource names (e.g., 'MyRule' -> 'rule-name') are documentation standardizations without security impact.
Diff
diff --git a/eventbridge/latest/userguide/eb-troubleshooting.md b/eventbridge/latest/userguide/eb-troubleshooting.md index 29d5b3d20..6aa969f4d 100644 --- a//eventbridge/latest/userguide/eb-troubleshooting.md +++ b//eventbridge/latest/userguide/eb-troubleshooting.md @@ -67,8 +67,16 @@ JSON - "Policy": "{\"Version\":\"2012-10-17\", - \"Statement\":[ - {\"Condition\":{\"ArnLike\":{\"AWS:SourceArn\":\"arn:aws:events:us-east-1:123456789012:rule/MyRule\"}}, - \"Action\":\"lambda:InvokeFunction\", - \"Resource\":\"arn:aws:lambda:us-east-1:123456789012:function:MyFunction\", - \"Effect\":\"Allow\", - \"Principal\":{\"Service\":\"events.amazonaws.com\"}, - \"Sid\":\"MyId\"} + "Version": "2012-10-17", + "Statement": [ + { + "Condition": { + "ArnLike": { + "AWS:SourceArn": "arn:aws:events:us-east-1:123456789012:rule/rule-name" + } + }, + "Action": "lambda:InvokeFunction", + "Resource": "arn:aws:lambda:us-east-1:123456789012:function:function-name", + "Effect": "Allow", + "Principal": { + "Service": "events.amazonaws.com" + }, + "Sid": "MyId" + } @@ -76 +84 @@ JSON - \"Id\":\"default\"}" + "Id": "default" @@ -235,19 +243,38 @@ JSON - "{\"Version\":\"2012-10-17\", - \"Id\":\"__default_policy_ID\", - \"Statement\":[{\"Sid\":\"__default_statement_ID\", - \"Effect\":\"Allow\", - \"Principal\":{\"AWS\":\"*\"}, - \"Action\":[\"SNS:Subscribe\", - \"SNS:ListSubscriptionsByTopic\", - \"SNS:DeleteTopic\", - \"SNS:GetTopicAttributes\", - \"SNS:Publish\", - \"SNS:RemovePermission\", - \"SNS:AddPermission\", - \"SNS:SetTopicAttributes\"], - \"Resource\":\"arn:aws:sns:us-east-1:123456789012:MyTopic\", - \"Condition\":{\"StringEquals\":{\"AWS:SourceOwner\":\"123456789012\"}}},{\"Sid\":\"Allow_Publish_Events\", - \"Effect\":\"Allow\", - \"Principal\":{\"Service\":\"events.amazonaws.com\"}, - \"Action\":\"sns:Publish\", - \"Resource\":\"arn:aws:sns:us-east-1:123456789012:MyTopic\"}]}" + { + "Version": "2012-10-17", + "Id": "__default_policy_ID", + "Statement": [ + { + "Sid": "__default_statement_ID", + "Effect": "Allow", + "Principal": { + "AWS": "*" + }, + "Action": [ + "SNS:Subscribe", + "SNS:ListSubscriptionsByTopic", + "SNS:DeleteTopic", + "SNS:GetTopicAttributes", + "SNS:Publish", + "SNS:RemovePermission", + "SNS:AddPermission", + "SNS:SetTopicAttributes" + ], + "Resource": "arn:aws:sns:us-east-1:123456789012:MyTopic", + "Condition": { + "StringEquals": { + "AWS:SourceOwner": "123456789012" + } + } + }, + { + "Sid": "Allow_Publish_Events", + "Effect": "Allow", + "Principal": { + "Service": "events.amazonaws.com" + }, + "Action": "sns:Publish", + "Resource": "arn:aws:sns:us-east-1:123456789012:MyTopic" + } + ] + }