You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Connecting Queues or Topics and Events to the AWS-CLI
4
-
description: This page explains how to connect Scaleway Queues and/or Topics and Events to the AWS-CLI
3
+
title: Connecting Topics and Events to the AWS-CLI
4
+
description: This page explains how to connect Scaleway Topics and Events to the AWS-CLI
5
5
content:
6
-
h1: Connecting Queues or Topics and Events to the AWS-CLI
7
-
paragraph: This page explains how to connect Scaleway Queues and/or Topics and Events to the AWS-CLI
8
-
tags: messaging sns sqs aws-cli cli aws sdk python boto
6
+
h1: Connecting Topics and Events to the AWS-CLI
7
+
paragraph: This page explains how to connect Scaleway Topics and Events to the AWS-CLI
8
+
tags: messaging sns aws-cli cli aws sdk python boto
9
9
categories:
10
10
- messaging
11
11
dates:
12
-
validation: 2024-10-18
12
+
validation: 2025-04-10
13
13
posted: 2023-01-04
14
14
---
15
15
16
-
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. With minimal configuration, you can start using the AWS-CLI with Scaleway Queues or Scaleway Topics and Events. This allows you to create, list and manage your queues and topics, send messages and much more, all from your command line.
16
+
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. With minimal configuration, you can start using the AWS-CLI with Scaleway Topics and Events. This allows you to create, list and manage your topics, send messages and much more, all from your command line.
17
17
18
-
This guide shows you how to install the AWS-CLI and configure it to connect to Scaleway Queues or Scaleway Topics and Events.
18
+
This guide shows you how to install the AWS-CLI and configure it to connect to Scaleway Topics and Events.
19
19
20
20
<Macroid="requirements" />
21
21
22
22
- A Scaleway account logged into the [console](https://console.scaleway.com)
23
23
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
24
-
- Valid [credentials](/messaging/how-to/create-credentials/) for Queues and/or Topics and Events
24
+
- Valid [credentials](/topics-and-events/how-to/create-credentials/) for Topics and Events
25
25
26
26
<Messagetype="note">
27
27
This page assumes you will use the AWS-CLI v1.
28
28
</Message>
29
29
30
30
## How to install the AWS-CLI
31
31
32
-
To interact with Scaleway Queues and Scaleway Topics and Events, both `aws-cli` and `awscli-plugin-endpoint` need to be installed. The `awscli-plugin-endpoint` is a useful plugin to help people more easily access third-party providers such as Scaleway.
32
+
To interact with Scaleway Topics and Events, both `aws-cli` and `awscli-plugin-endpoint` need to be installed. The `awscli-plugin-endpoint` is a useful plugin to help people more easily access third-party providers such as Scaleway.
33
33
34
34
Install both `aws-cli` and `awscli-plugin` using `pip`.
Now you have installed the AWS-CLI, you need to configure it for use with Scaleway Queues / Topics and Events.
43
+
Now you have installed the AWS-CLI, you need to configure it for use with Scaleway Topics and Events.
44
44
45
45
1. Create a file named `~/.aws/config` by running the following command:
46
46
```
@@ -51,21 +51,17 @@ Now you have installed the AWS-CLI, you need to configure it for use with Scalew
51
51
With the most recent versions of awscli (1.29.0 or 2.13.0), the use of a plugin is not necessary. If you are using one of those versions and wish to skip this step, you can do so. Note that this will also affect your configuration file in the next step.
52
52
</Message>
53
53
54
-
2. Open the `~/.aws/config` file you just created in a text editor and edit it as follows (the Queues (SQS) or Topics and Events (SNS) endpoint URLs can be found in the console on the **Settings** page for the relevant product)
54
+
2. Open the `~/.aws/config` file you just created in a text editor and edit it as follows (the Topics and Events (SNS) endpoint URLs can be found in the console on the **Settings** page for your Topics and Events service).
Optionally, you can also configure additional profiles by adding new blocks under `[sqs]` and `[sns]`. For example, you can add a third profile, `[profile aws]`, to connect to the AWS SQS/SNS service if you want:
64
+
Optionally, you can also configure additional profiles by adding new blocks under `[sns]`. For example, you can add a profile for `[sqs]` if you are also using Scaleway Queues, or another profile, `[profile aws]`, to connect to the AWS SQS/SNS service if you want:
69
65
70
66
```
71
67
[plugins]
@@ -93,9 +89,6 @@ Now you have installed the AWS-CLI, you need to configure it for use with Scalew
@@ -105,33 +98,31 @@ Now you have installed the AWS-CLI, you need to configure it for use with Scalew
105
98
aws configure
106
99
```
107
100
**
108
-
4. Open the `~/.aws/credentials` file you just created, and for each product (out of **Queues** and **Topics and Events**) you want to use, add the access key and secret key you saved when you generated your [credentials](/messaging/how-to/create-credentials/):
101
+
4. Open the `~/.aws/credentials` file you just created, and add the access key and secret key you saved when you generated your [credentials](/topics-and-events/how-to/create-credentials/):
109
102
```
110
103
[topics_events]
111
104
aws_access_key_id=<ACCESS_KEY_FOR_SNS>
112
105
aws_secret_access_key=<SECRET_KEY_FOR_SNS>
106
+
```
113
107
108
+
If you have other profiles, you can add a block to indicate their credentials too:
109
+
```
114
110
[queues]
115
111
aws_access_key_id=<ACCESS_KEY_FOR_SQS>
116
112
aws_secret_access_key=<SECRET_KEY_FOR_SQS>
117
-
```
118
113
119
-
If you have other profiles, you can add a block to indicate their credentials too:
120
-
```
121
114
[aws]
122
115
aws_access_key_id=<ACCESS_KEY>
123
116
aws_secret_access_key=<SECRET_KEY>
124
117
```
125
118
126
119
6. Test that everything is set up correctly with the following command:
127
120
```
128
-
aws queues list-queues
121
+
aws topics_events list-topics
129
122
```
130
123
131
124
Use the `--profile` option if you want to test it using a different profile.
132
125
133
126
<Messagetype="tip">
134
-
Check out our dedicated documentation to find more common commands for getting started with the AWS CLI:
135
-
- The [Queues guide](/messaging/api-cli/sqs-sns-aws-cli/#getting-started-with-scaleway-queues) walks you through creating and listing queues, sending messages to queues, and more.
136
-
- The [Topics and Events guide](/messaging/api-cli/sqs-sns-aws-cli/#getting-started-with-topics-and-events) shows you how to create and list topics and subscriptions, send messages to topics, and more.
127
+
Check out our dedicated documentation to find more common commands for getting started with the AWS CLI. The [Topics and EVents guide](/queues/api-cli/topics-events-aws-cli/) walks you through creating and listing topics, sending messages.
Copy file name to clipboardExpand all lines: pages/topics-and-events/api-cli/python-node-topics-events.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ dates:
13
13
posted: 2023-01-04
14
14
---
15
15
16
-
AWS provides a number of **S**oftware **D**evelopment **K**its (SDKs) which provide language-specific APIs for AWS services, including [SNS](/messaging/concepts/#sns), which is the protocol that Scaleway Topics and Events is based on.
16
+
AWS provides a number of **S**oftware **D**evelopment **K**its (SDKs) which provide language-specific APIs for AWS services, including [SNS](/topics-and-events/concepts/#sns), which is the protocol that Scaleway Topics and Events is based on.
17
17
18
18
- AWS provides a dedicated [SDK for Go](https://aws.amazon.com/sdk-for-go/).
19
19
- The [AWS SDK for Python](https://aws.amazon.com/sdk-for-python/) is Boto3.
@@ -25,7 +25,7 @@ This page provides code samples to show you how to get started using these SDKs
25
25
26
26
- A Scaleway account logged into the [console](https://console.scaleway.com)
27
27
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
28
-
- Valid [credentials](/messaging/how-to/create-credentials/) for Topics and Events
28
+
- Valid [credentials](/topics-and-events/how-to/create-credentials/) for Topics and Events
The `Endpoint` for Scaleway Topics and Events is `https://sns.mnq.fr-par.scaleway.com`. The values for the access and secret keys should be the credentials you [generated](/messaging/how-to/create-credentials/) for Topics and Events.
60
+
The `Endpoint` for Scaleway Topics and Events is `https://sns.mnq.fr-par.scaleway.com`. The values for the access and secret keys should be the credentials you [generated](/topics-and-events/how-to/create-credentials/) for Topics and Events.
61
61
62
62
</Message>
63
63
64
-
Once connected, you can use any of the SDK's available functions. Be aware though that some functions are not [supported by Scaleway Topics and Events](/messaging/reference-content/sns-support/), so make sure to check the link for more details on these. See the [official SDK documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go/service/sns) for more information on getting started with the SDK, or keep reading for some code examples.
64
+
Once connected, you can use any of the SDK's available functions. Be aware though that some functions are not [supported by Scaleway Topics and Events](/topics-and-events/reference-content/sns-support/), so make sure to check the link for more details on these. See the [official SDK documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go/service/sns) for more information on getting started with the SDK, or keep reading for some code examples.
65
65
66
66
### Create topic (Go)
67
67
@@ -159,10 +159,10 @@ sns = boto3.resource('sns',
159
159
```
160
160
161
161
<Message type="note">
162
-
The `endpoint_url` for Scaleway Topics and Events (based on SNS) is `https://sns.mnq.fr-par.scaleway.com`. The values for the access and secret keys should be the credentials you [generated](/messaging/how-to/create-credentials/) for Topics and Events.
162
+
The `endpoint_url` for Scaleway Topics and Events (based on SNS) is `https://sns.mnq.fr-par.scaleway.com`. The values for the access and secret keys should be the credentials you [generated](/topics-and-events/how-to/create-credentials/) for Topics and Events.
163
163
</Message>
164
164
165
-
Once connected to, you can use any of the SDK's available functions. However, some functions are not [supported by ScalewayTopics and Events](/messaging/reference-content/sns-support/), so do check the link to make sure. See the [official SDK documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) for more information, or keep reading for some code examples.
165
+
Once connected to, you can use any of the SDK's available functions. However, some functions are not [supported by ScalewayTopics and Events](/topics-and-events/reference-content/sns-support/), so do check the link to make sure. See the [official SDK documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) for more information, or keep reading for some code examples.
166
166
167
167
### Createtopic (Python)
168
168
@@ -276,10 +276,10 @@ var snsClient = new SNSClient({
276
276
```
277
277
278
278
<Message type="note">
279
-
The`endpoint_url`forScalewayTopics and Events is `https://sns.mnq.fr-par.scaleway.com`. For the access and secret key values, use the credentials you [generated](/messaging/how-to/create-credentials/) forTopics and Events.
279
+
The`endpoint_url`forScalewayTopics and Events is `https://sns.mnq.fr-par.scaleway.com`. For the access and secret key values, use the credentials you [generated](/topics-and-events/how-to/create-credentials/) forTopics and Events.
280
280
</Message>
281
281
282
-
Once connected, you can use any of the SDK's available functions. However, some functions are not [supported by Scaleway Topics and Events](/messaging/reference-content/sns-support), so do check the link to make sure. See the [official SDK documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sns/) for more information, or keep reading for some code examples.
282
+
Once connected, you can use any of the SDK's available functions. However, some functions are not [supported by Scaleway Topics and Events](/topics-and-events/reference-content/sns-support), so do check the link to make sure. See the [official SDK documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sns/) for more information, or keep reading for some code examples.
Copy file name to clipboardExpand all lines: pages/topics-and-events/api-cli/topics-events-aws-cli.mdx
+11-55Lines changed: 11 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,72 +1,28 @@
1
1
---
2
2
meta:
3
-
title: Using Scaleway Queues and Scaleway Topics and Events with the AWS-CLI
4
-
description: This page explains how to use Scaleway Queues and Scaleway Topics and Events for creating queues and sending and receiving messages with the AWS CLI
3
+
title: Using Scaleway Topics and Events with the AWS-CLI
4
+
description: This page explains how to use Scaleway Topics and Events for creating topics and sending and receiving messages with the AWS CLI
5
5
content:
6
-
h1: Using Scaleway Queues and Scaleway Topics and Events with the AWS-CLI
7
-
paragraph: This page explains how to use Scaleway Queues and Scaleway Topics and Events for creating queues and sending and receiving messages with the AWS CLI
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 and/or Topics and Events to the AWS-CLI](/messaging/api-cli/connect-aws-cli/), you can start creating, listing and managing your queues and topics, sending messages and much more, all from your command line.
16
+
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 Topics and Events to the AWS-CLI](/topics-and-events/api-cli/connect-aws-cli/), you can start creating, listing and managing your topics, sending messages and much more, all from your command line.
18
17
19
18
<Macroid="requirements" />
20
19
21
20
- A Scaleway account logged into the [console](https://console.scaleway.com)
22
21
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
23
-
- Valid [credentials](/messaging/how-to/create-credentials/) for Queues and/or Topics and Events
24
-
-[Connected Queues and/or Topics and Events to the AWS-CLI](/messaging/api-cli/connect-aws-cli/)
22
+
- Valid [credentials](/topics-and-events/how-to/create-credentials/) for Topics and Events
23
+
-[Connected Topics and Events to the AWS-CLI](/topics-and-events/api-cli/connect-aws-cli/)
25
24
-[jq](https://stedolan.github.io/jq/download/) installed on your machine
26
25
27
-
## Getting started with Scaleway Queues
28
-
29
-
1. Use the following command to create a queue:
30
-
31
-
```sh
32
-
aws sqs create-queue --queue-name MyQueue | tee my-queue.json
33
-
```
34
-
35
-
2. Use the following command to list existing queues:
36
-
37
-
```sh
38
-
aws sqs list-queues
39
-
```
40
-
41
-
3. Use the following command to send messages to a queue:
aws sqs receive-message --queue-url $(jq -r .QueueUrl my-queue.json)| tee message1.json
53
-
54
-
aws sqs receive-message --queue-url $(jq -r .QueueUrl my-queue.json)| tee message2.json
55
-
```
56
-
57
-
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.
0 commit comments