---
title: Using Scaleway Queues with the AWS-CLI
description: This page explains how to use Scaleway Queues with the AWS CLI
tags: messaging sqs aws-cli cli aws queues messages
dates:
  validation: 2025-10-07
  posted: 2025-04-02
---
import Requirements from '@macros/iam/requirements.mdx'


The AWS-CLI is an open-source tool built on top of the AWS SDK for Python (Boto) that provides commands for interacting with AWS services. Once you have [connected Scaleway Queues to the AWS-CLI](/queues/api-cli/connect-aws-cli/), you can start creating, listing and managing your queues, sending messages and much more, all from your command line.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- Valid [credentials](/queues/how-to/create-credentials/) for Queues
- [Connected Queues to the AWS-CLI](/queues/api-cli/connect-aws-cli/)
- [jq](https://stedolan.github.io/jq/download/) installed on your machine

## Getting started with Scaleway Queues

1. Use the following command to create a queue:

    ```bash
    aws sqs create-queue --queue-name MyQueue | tee my-queue.json
    ```

2. Use the following command to list existing queues:

    ```bash
    aws sqs list-queues
    ```

3. Use the following command to send messages to a queue:

    ```bash
    aws sqs send-message --queue-url $(jq -r .QueueUrl my-queue.json) --message-body "Hello world!"

    aws sqs send-message --queue-url $(jq -r .QueueUrl my-queue.json) --message-body "Second Message."
    ```

4. Use the following command to receive messages:

    ```bash
    aws sqs receive-message --queue-url $(jq -r .QueueUrl my-queue.json) | tee message1.json

    aws sqs receive-message --queue-url $(jq -r .QueueUrl my-queue.json) | tee message2.json
    ```

5. Use the following command to delete messages. This is necessary as once a message has been processed on your consumer side (typically by a worker), it will be re-queued unless it is explicitly deleted.

    ```bash
    aws sqs delete-message --queue-url $(jq -r .QueueUrl my-queue.json) --receipt-handle $(jq -r .Messages[0].ReceiptHandle message1.json)

    aws sqs delete-message --queue-url $(jq -r .QueueUrl my-queue.json) --receipt-handle $(jq -r .Messages[0].ReceiptHandle message2.json)
    ```

6. Use the following command to delete the queue itself:

    ```bash
    aws sqs delete-queue --queue-url $(jq -r .QueueUrl my-queue.json)
    ```