-
Notifications
You must be signed in to change notification settings - Fork 258
feat(topics): add separate topics and events doc #4834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0d7e9ee
feat(topics): start resturcture
RoRoJ fa8f7bd
fix(topics): started concepts
RoRoJ 8b09cf1
feat(topics): continue to add content
RoRoJ 63498d0
feat(topics-and-events): finish adding new doc
RoRoJ 68d7196
Apply suggestions from code review
RoRoJ ed0b282
Update pages/topics-and-events/concepts.mdx
RoRoJ e377f67
Apply suggestions from code review
RoRoJ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| --- | ||
| meta: | ||
| title: Connecting Topics and Events to the AWS-CLI | ||
| description: This page explains how to connect Scaleway Topics and Events to the AWS-CLI | ||
| content: | ||
| h1: Connecting Topics and Events to the AWS-CLI | ||
| paragraph: This page explains how to connect Scaleway Topics and Events to the AWS-CLI | ||
| tags: messaging sns aws-cli cli aws sdk python boto | ||
| categories: | ||
| - messaging | ||
| dates: | ||
| validation: 2025-04-10 | ||
| posted: 2023-01-04 | ||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| This guide shows you how to install the AWS-CLI and configure it to connect to Scaleway Topics and Events. | ||
|
|
||
| <Macro id="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](/topics-and-events/how-to/create-credentials/) for Topics and Events | ||
|
|
||
| <Message type="note"> | ||
| This page assumes you will use the AWS-CLI v1. | ||
| </Message> | ||
|
|
||
| ## How to install the AWS-CLI | ||
|
|
||
| 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. | ||
|
|
||
| Install both `aws-cli` and `awscli-plugin` using `pip`. | ||
|
|
||
| ``` | ||
| pip3 install awscli | ||
| pip3 install awscli-plugin-endpoint | ||
| ``` | ||
|
|
||
| ## How to configure the AWS-CLI | ||
|
|
||
| Now you have installed the AWS-CLI, you need to configure it for use with Scaleway Topics and Events. | ||
|
|
||
| 1. Create a file named `~/.aws/config` by running the following command: | ||
| ``` | ||
| aws configure set plugins.endpoint awscli_plugin_endpoint | ||
| ``` | ||
|
|
||
| <Message type="tip"> | ||
| 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. | ||
| </Message> | ||
|
|
||
| 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). | ||
| ``` | ||
| [plugins] | ||
| endpoint = awscli_plugin_endpoint | ||
| [profile sns] | ||
| region = fr-par | ||
| sns = | ||
| endpoint_url = https://sns.mnq.fr-par.scaleway.com | ||
| ``` | ||
|
|
||
| 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: | ||
|
|
||
| ``` | ||
| [plugins] | ||
| endpoint = awscli_plugin_endpoint | ||
| [profile sns] | ||
| region = fr-par | ||
| sns = | ||
| endpoint_url = https://sns.mnq.fr-par.scaleway.com | ||
| [profile sqs] | ||
| region = fr-par | ||
| sqs = | ||
| endpoint_url = https://sqs.mnq.fr-par.scaleway.com | ||
| [profile aws] | ||
| region=eu-west-3 | ||
| output=json | ||
| ``` | ||
|
|
||
| <Message type="important"> | ||
| 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. | ||
| </Message> | ||
|
|
||
| <Message type="tip"> | ||
| If you are using aws 1.29.0 or 2.13.0 without the plugin, your configuration file should be as follows: | ||
| ``` | ||
| [profile sns] | ||
| region = fr-par | ||
| endpoint_url = https://sns.mnq.fr-par.scaleway.com | ||
| ``` | ||
| </Message> | ||
|
|
||
|
|
||
| 3. Generate a credentials file using the following command: | ||
| ``` | ||
| aws configure | ||
| ``` | ||
| ** | ||
| 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/): | ||
| ``` | ||
| [topics_events] | ||
| aws_access_key_id=<ACCESS_KEY_FOR_SNS> | ||
| aws_secret_access_key=<SECRET_KEY_FOR_SNS> | ||
| ``` | ||
|
|
||
| If you have other profiles, you can add a block to indicate their credentials too: | ||
| ``` | ||
| [queues] | ||
| aws_access_key_id=<ACCESS_KEY_FOR_SQS> | ||
| aws_secret_access_key=<SECRET_KEY_FOR_SQS> | ||
|
|
||
| [aws] | ||
| aws_access_key_id=<ACCESS_KEY> | ||
| aws_secret_access_key=<SECRET_KEY> | ||
| ``` | ||
|
|
||
| 6. Test that everything is set up correctly with the following command: | ||
| ``` | ||
| aws topics_events list-topics | ||
| ``` | ||
|
|
||
| Use the `--profile` option if you want to test it using a different profile. | ||
|
|
||
| <Message type="tip"> | ||
| 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. | ||
| </Message> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| meta: | ||
| title: Topics and Events - API/CLI Documentation | ||
| description: Topics and Events API/CLI Documentation | ||
| content: | ||
| h1: Topics and Events - API/CLI Documentation | ||
| paragraph: Topics and Events API/CLI Documentation | ||
| --- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.