AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-06-28 · Documentation low

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

Summary

Added PowerShell V5 examples for GetQueueAttributes API showing queue attribute retrieval including security policy details

Security assessment

While the examples show policy configurations, this is standard feature documentation rather than addressing a security issue or explicitly explaining security controls

Diff

diff --git a/code-library/latest/ug/sqs_example_sqs_GetQueueAttributes_section.md b/code-library/latest/ug/sqs_example_sqs_GetQueueAttributes_section.md
index f5393270d..98ac58e44 100644
--- a//code-library/latest/ug/sqs_example_sqs_GetQueueAttributes_section.md
+++ b//code-library/latest/ug/sqs_example_sqs_GetQueueAttributes_section.md
@@ -331,0 +332,61 @@ PowerShell
+**Tools for PowerShell V5**
+    
+
+**Example 1: This example lists all attributes for the specified queue.**
+    
+    
+    Get-SQSQueueAttribute -AttributeName All -QueueUrl https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyQueue
+    
+
+**Output:**
+    
+    
+    VisibilityTimeout                     : 30
+    DelaySeconds                          : 0
+    MaximumMessageSize                    : 262144
+    MessageRetentionPeriod                : 345600
+    ApproximateNumberOfMessages           : 0
+    ApproximateNumberOfMessagesNotVisible : 0
+    ApproximateNumberOfMessagesDelayed    : 0
+    CreatedTimestamp                      : 2/11/2015 5:53:35 PM
+    LastModifiedTimestamp                 : 12/29/2015 2:23:17 PM
+    QueueARN                              : arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue
+    Policy                                : {"Version":"2008-10-17","Id":"arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue/SQSDefaultPolicy","Statement":[{"Sid":"Sid14
+                                            495134224EX","Effect":"Allow","Principal":{"AWS":"*"},"Action":"SQS:SendMessage","Resource":"arn:aws:sqs:us-east-1:80
+                                            398EXAMPLE:MyQueue","Condition":{"ArnEquals":{"aws:SourceArn":"arn:aws:sns:us-east-1:80398EXAMPLE:MyTopic"}}},{"Sid":
+                                            "SendMessagesFromMyQueue","Effect":"Allow","Principal":{"AWS":"80398EXAMPLE"},"Action":"SQS:SendMessage","Resource":"
+                                            arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue"}]}
+    Attributes                            : {[QueueArn, arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue], [ApproximateNumberOfMessages, 0], 
+                                            [ApproximateNumberOfMessagesNotVisible, 0], [ApproximateNumberOfMessagesDelayed, 0]...}
+
+**Example 2: This example lists separately only the specified attributes for the specified queue.**
+    
+    
+    Get-SQSQueueAttribute -AttributeName MaximumMessageSize, VisibilityTimeout -QueueUrl https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyQueue
+    
+
+**Output:**
+    
+    
+    VisibilityTimeout                     : 30
+    DelaySeconds                          : 0
+    MaximumMessageSize                    : 262144
+    MessageRetentionPeriod                : 345600
+    ApproximateNumberOfMessages           : 0
+    ApproximateNumberOfMessagesNotVisible : 0
+    ApproximateNumberOfMessagesDelayed    : 0
+    CreatedTimestamp                      : 2/11/2015 5:53:35 PM
+    LastModifiedTimestamp                 : 12/29/2015 2:23:17 PM
+    QueueARN                              : arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue
+    Policy                                : {"Version":"2008-10-17","Id":"arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue/SQSDefaultPolicy","Statement":[{"Sid":"Sid14
+                                            495134224EX","Effect":"Allow","Principal":{"AWS":"*"},"Action":"SQS:SendMessage","Resource":"arn:aws:sqs:us-east-1:80
+                                            398EXAMPLE:MyQueue","Condition":{"ArnEquals":{"aws:SourceArn":"arn:aws:sns:us-east-1:80398EXAMPLE:MyTopic"}}},{"Sid":
+                                            "SendMessagesFromMyQueue","Effect":"Allow","Principal":{"AWS":"80398EXAMPLE"},"Action":"SQS:SendMessage","Resource":"
+                                            arn:aws:sqs:us-east-1:80398EXAMPLE:MyQueue"}]}
+    Attributes                            : {[MaximumMessageSize, 262144], [VisibilityTimeout, 30]}
+
+  * For API details, see [GetQueueAttributes](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. 
+
+
+
+