You can access the features of Amazon Simple Queue Service (Amazon SQS) using the AWS Command Line Interface (AWS CLI).
Before you run any commands, set your default credentials. For more information, see Configuring the AWS CLI.
Before you run any commands, set your default credentials. For more information, see Configuring the AWS CLI.
Create Queue
Creates a new standard or FIFO queue. You can pass one or more attributes in the request. Keep the following caveats in mind:
- If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue.
- If you don't provide a value for an attribute, the queue is created with the default value for the attribute.
- If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.
create-queue
--queue-name <value>
[--attributes <value>]
[--tags <value>]
[--cli-input-json <value>]
$ aws sqs create-queue --queue-name test-queue
{
"QueueUrl": "https://ap-south-1.queue.amazonaws.com/23456789012/test-queue"
}
Delete Queue
Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle of the message (not the MessageId which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue. delete-message
--queue-url <value>
--receipt-handle <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
No comments:
Post a Comment