Skip to content

Commit 4b9bfb4

Browse files
RoRoJjcirinosclwy
andcommitted
feat(topics): add separate topics and events doc (#4834)
* feat(topics): start resturcture * fix(topics): started concepts * feat(topics): continue to add content * feat(topics-and-events): finish adding new doc * Apply suggestions from code review Co-authored-by: Jessica <[email protected]> * Update pages/topics-and-events/concepts.mdx * Apply suggestions from code review Co-authored-by: Jessica <[email protected]> --------- Co-authored-by: Jessica <[email protected]>
1 parent 4e88d9f commit 4b9bfb4

25 files changed

+1788
-15
lines changed

menu/navigation.json

Lines changed: 103 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4430,23 +4430,111 @@
44304430
"slug": "queues"
44314431
},
44324432
{
4433-
"items": [
4434-
{
4435-
"label": "Overview",
4436-
"slug": "../serverless-sql-databases"
4437-
},
4438-
{
4439-
"label": "Concepts",
4440-
"slug": "concepts"
4441-
},
4442-
{
4443-
"label": "Quickstart",
4444-
"slug": "quickstart"
4433+
"items": [
4434+
{
4435+
"label": "Overview",
4436+
"slug": "../topics-and-events"
4437+
},
4438+
{
4439+
"label": "Concepts",
4440+
"slug": "concepts"
4441+
},
4442+
{
4443+
"label": "Quickstart",
4444+
"slug": "quickstart"
4445+
},
4446+
{
4447+
"label": "FAQ",
4448+
"slug": "faq"
4449+
},
4450+
{
4451+
"items": [
4452+
{
4453+
"label": "Create credentials",
4454+
"slug": "create-credentials"
4455+
},
4456+
{
4457+
"label": "Manage credentials",
4458+
"slug": "manage-credentials"
4459+
},
4460+
{
4461+
"label": "Create and manage queues",
4462+
"slug": "create-manage-topics"
4463+
},
4464+
{
4465+
"label": "Create and manage subscriptions",
4466+
"slug": "create-manage-subscriptions"
4467+
},
4468+
{
4469+
"label": "Monitor Topics and Events with Cockpit",
4470+
"slug": "monitor-topics-cockpit"
4471+
}
4472+
],
4473+
"label": "How to",
4474+
"slug": "how-to"
4475+
},
4476+
{
4477+
"items": [
4478+
{
4479+
"label": "Topics and Events API Reference",
4480+
"slug": "https://www.scaleway.com/en/developers/api/messaging-and-queuing/sns-api/"
4481+
},
4482+
{
4483+
"label": "Connecting Topics and Events to the AWS-CLI",
4484+
"slug": "connect-aws-cli"
4485+
},
4486+
{
4487+
"label": "Using Topics and Events with the AWS-CLI",
4488+
"slug": "topics-events-aws-cli"
4489+
},
4490+
{
4491+
"label": "Using Go, Python or Node.js with Topics and Events",
4492+
"slug": "python-node-topics-events"
4493+
}
4494+
],
4495+
"label": "API/CLI",
4496+
"slug": "api-cli"
4497+
},
4498+
{
4499+
"items": [
4500+
{
4501+
"label": "Topics and Events overview",
4502+
"slug": "topics-and-events-overview"
4503+
},
4504+
{
4505+
"label": "Topics and Events - supported actions",
4506+
"slug": "topics-and-events-support"
4507+
},
4508+
{
4509+
"label": "Limitations",
4510+
"slug": "limitations"
4511+
}
4512+
],
4513+
"label": "Additional Content",
4514+
"slug": "reference-content"
4515+
}
4516+
],
4517+
"label": "Topics and Events",
4518+
"slug": "topics-and-events"
44454519
},
44464520
{
4447-
"label": "FAQ",
4448-
"slug": "faq"
4449-
},
4521+
"items": [
4522+
{
4523+
"label": "Overview",
4524+
"slug": "../serverless-sql-databases"
4525+
},
4526+
{
4527+
"label": "Concepts",
4528+
"slug": "concepts"
4529+
},
4530+
{
4531+
"label": "Quickstart",
4532+
"slug": "quickstart"
4533+
},
4534+
{
4535+
"label": "FAQ",
4536+
"slug": "faq"
4537+
},
44504538
{
44514539
"items": [
44524540
{
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
meta:
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+
content:
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+
categories:
10+
- messaging
11+
dates:
12+
validation: 2025-04-10
13+
posted: 2023-01-04
14+
---
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 Topics and Events. This allows you to create, list and manage your topics, send messages and much more, all from your command line.
17+
18+
This guide shows you how to install the AWS-CLI and configure it to connect to Scaleway Topics and Events.
19+
20+
<Macro id="requirements" />
21+
22+
- A Scaleway account logged into the [console](https://console.scaleway.com)
23+
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
24+
- Valid [credentials](/topics-and-events/how-to/create-credentials/) for Topics and Events
25+
26+
<Message type="note">
27+
This page assumes you will use the AWS-CLI v1.
28+
</Message>
29+
30+
## How to install the AWS-CLI
31+
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+
34+
Install both `aws-cli` and `awscli-plugin` using `pip`.
35+
36+
```
37+
pip3 install awscli
38+
pip3 install awscli-plugin-endpoint
39+
```
40+
41+
## How to configure the AWS-CLI
42+
43+
Now you have installed the AWS-CLI, you need to configure it for use with Scaleway Topics and Events.
44+
45+
1. Create a file named `~/.aws/config` by running the following command:
46+
```
47+
aws configure set plugins.endpoint awscli_plugin_endpoint
48+
```
49+
50+
<Message type="tip">
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+
</Message>
53+
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).
55+
```
56+
[plugins]
57+
endpoint = awscli_plugin_endpoint
58+
[profile sns]
59+
region = fr-par
60+
sns =
61+
endpoint_url = https://sns.mnq.fr-par.scaleway.com
62+
```
63+
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:
65+
66+
```
67+
[plugins]
68+
endpoint = awscli_plugin_endpoint
69+
[profile sns]
70+
region = fr-par
71+
sns =
72+
endpoint_url = https://sns.mnq.fr-par.scaleway.com
73+
[profile sqs]
74+
region = fr-par
75+
sqs =
76+
endpoint_url = https://sqs.mnq.fr-par.scaleway.com
77+
[profile aws]
78+
region=eu-west-3
79+
output=json
80+
```
81+
82+
<Message type="important">
83+
If you are using the AWS-CLI v2, you must include the path to the plugin in your configuration file. Add `cli_legacy_plugin_path = <path-to-plugin>` to the `[plugins]` section, replacing `<path-to-plugin>` with the corresponding path.
84+
</Message>
85+
86+
<Message type="tip">
87+
If you are using aws 1.29.0 or 2.13.0 without the plugin, your configuration file should be as follows:
88+
```
89+
[profile sns]
90+
region = fr-par
91+
endpoint_url = https://sns.mnq.fr-par.scaleway.com
92+
```
93+
</Message>
94+
95+
96+
3. Generate a credentials file using the following command:
97+
```
98+
aws configure
99+
```
100+
**
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/):
102+
```
103+
[topics_events]
104+
aws_access_key_id=<ACCESS_KEY_FOR_SNS>
105+
aws_secret_access_key=<SECRET_KEY_FOR_SNS>
106+
```
107+
108+
If you have other profiles, you can add a block to indicate their credentials too:
109+
```
110+
[queues]
111+
aws_access_key_id=<ACCESS_KEY_FOR_SQS>
112+
aws_secret_access_key=<SECRET_KEY_FOR_SQS>
113+
114+
[aws]
115+
aws_access_key_id=<ACCESS_KEY>
116+
aws_secret_access_key=<SECRET_KEY>
117+
```
118+
119+
5. Test that everything is set up correctly with the following command:
120+
```
121+
aws topics_events list-topics
122+
```
123+
124+
Use the `--profile` option if you want to test it using a different profile.
125+
126+
<Message type="tip">
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.
128+
</Message>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
meta:
3+
title: Topics and Events - API/CLI Documentation
4+
description: Topics and Events API/CLI Documentation
5+
content:
6+
h1: Topics and Events - API/CLI Documentation
7+
paragraph: Topics and Events API/CLI Documentation
8+
---

0 commit comments

Comments
 (0)