Complete the code to create a new SQS queue using AWS CLI.
aws sqs create-queue --queue-name [1]The --queue-name option requires the name of the queue to create. Here, MyQueue is a valid queue name.
Complete the code to send a message to an SQS queue using AWS CLI.
aws sqs send-message --queue-url [1] --message-body "Hello World"
The --queue-url option requires the full URL of the queue, not just the name.
Fix the error in the code to receive messages from an SQS queue.
aws sqs [1] --queue-url https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue
The correct AWS CLI command to receive messages is receive-message all lowercase and hyphenated.
Fill both blanks to configure a dead-letter queue for an SQS queue using AWS CLI.
aws sqs set-queue-attributes --queue-url [1] --attributes RedrivePolicy='{"deadLetterTargetArn":"[2]","maxReceiveCount":"5"}'
The --queue-url is the main queue URL, and the deadLetterTargetArn is the ARN of the dead-letter queue.
Fill all three blanks to create an SQS queue with a visibility timeout of 45 seconds using AWS CLI.
aws sqs create-queue --queue-name [1] --attributes [2]=[3]
The queue name is MyVisibilityQueue. The attribute VisibilityTimeout is set to 45 seconds to control how long a message stays invisible after being received.