Remember that you need to create credentials in order to access your SNS service and its topics from an API or CLI. Sending messages to topics requires that credentials have the can_publish
permission, while receiving messages from topics requires the can_receive
permission. You can create separate credentials if you need to isolate these two roles in your application.
How to create and manage SNS topics
This page shows how to create and manage SNS topics with Scaleway Messaging and Queuing.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Activated SNS for the region in which you want to create a topic
How to create a topic
-
Click Messaging in the Serverless section of the Scaleway console side menu. The list of Messaging and Queuing protocols displays.
-
Use the drop-down menu to select the region in which you want to create a topic.
-
Click SNS, then navigate to the Topics tab and click Create topic. The topic creation wizard displays.
-
Enter a name for your topic. The name must contain no more than 80 characters, and consist only of alphanumeric characters, hyphens, and underscores. Alternatively, you can go with the auto-generated name suggested for you.
-
Choose a topic type. The following topic types are available:
- Standard: Ensures at-least-once message delivery, where the order of messages is not preserved. Supports Serverless Functions, Serverless Containers and HTTP/S subscriptions.
- FIFO: Provides first-in-first-out delivery, where the order of messages is preserved without duplication. Supports SQS subscriptions. Content-based deduplication is only available for FIFO topics.
-
Click Create topic to finish.
You are returned to the Topics tab, where your newly-created topic now displays. The topic’s URL is also displayed here, for use in your API/CLI operations.
How to delete a topic
When you no longer want a topic, you can delete it. This action is irreversible and deletes the topic along with all its associated subscriptions.
-
Click Messaging in the Serverless section of the Scaleway console side menu. The list of Messaging and Queuing protocols displays.
-
Use the drop-down menu to select the region containing the topic you want to delete.
-
Click SNS, then navigate to the Topics tab, where the list of your topics in the pre-selected region displays.
-
Click the topic you wish to delete. The topic’s Settings page displays.
-
Either:
- Click the topic you wish to delete. The topic’s Settings page displays. Click the Delete topic button in the bottom right corner.
- Click the «See more Icon» icon next to the topic you wish to delete, then select Delete from the menu that displays.
A pop-up asks you to confirm that you understand this action will delete the topic and all of its associated subscriptions.
-
Type DELETE and click Delete topic.