0
0
AWScloud~10 mins

Sending and receiving messages in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an SQS queue named 'MyQueue'.

AWS
aws sqs create-queue --queue-name [1]
Drag options to blanks, or click blank then click option'
AQueue1
BMyQueue
CTestQueue
DSampleQueue
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different queue name than 'MyQueue'.
Omitting the --queue-name option.
2fill in blank
medium

Complete the code to send a message with body 'HelloWorld' to the queue URL stored in QUEUE_URL.

AWS
aws sqs send-message --queue-url [1] --message-body HelloWorld
Drag options to blanks, or click blank then click option'
A$QUEUE_URL
BMyQueueUrl
CQUEUE_URL
DqueueUrl
Attempts:
3 left
💡 Hint
Common Mistakes
Not using the $ sign to reference the variable.
Using the queue name instead of the queue URL.
3fill in blank
hard

Fix the error in the code to receive one message from the queue URL stored in QUEUE_URL.

AWS
aws sqs receive-message --queue-url [1] --max-number-of-messages 1
Drag options to blanks, or click blank then click option'
AqueueUrl
BQUEUE_URL
CMyQueueUrl
D$QUEUE_URL
Attempts:
3 left
💡 Hint
Common Mistakes
Using the variable name without $.
Using an incorrect variable name.
4fill in blank
hard

Fill both blanks to set the visibility timeout to 30 seconds when receiving messages from the queue.

AWS
aws sqs receive-message --queue-url [1] --[2] 30
Drag options to blanks, or click blank then click option'
A$QUEUE_URL
Bvisibility-timeout
Cmax-number-of-messages
Dwait-time-seconds
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong option name for visibility timeout.
Not using $ to reference the queue URL variable.
5fill in blank
hard

Fill all three blanks to delete a message from the queue using its ReceiptHandle stored in RECEIPT_HANDLE.

AWS
aws sqs delete-message --queue-url [1] --receipt-handle [2] --region [3]
Drag options to blanks, or click blank then click option'
A$QUEUE_URL
B$RECEIPT_HANDLE
Cus-east-1
Dus-west-2
Attempts:
3 left
💡 Hint
Common Mistakes
Not using $ to reference variables.
Using incorrect region names.