SNS — Topics & Subscriptions
SNS in Floci Studio supports standard and FIFO topics, subscription management across all protocols, and a publish panel for testing message delivery.
Creating a topic
Section titled “Creating a topic”- Click SNS in the sidebar.
- Click Create Topic.
- Enter a topic name (e.g.,
system-alerts). - Toggle FIFO Topic if you need ordered delivery and deduplication. The
.fifosuffix is added automatically, andContentBasedDeduplicationis enabled. - Click Create.
Topic detail view
Section titled “Topic detail view”Click any topic card to open the drill-down. Three tabs are available:
Subscriptions tab
Section titled “Subscriptions tab”Lists all active subscriptions with protocol, endpoint, and confirmation status. Click Add Subscription to subscribe a new endpoint.
Supported protocols:
email/email-jsonhttp/httpssqs— paste the queue ARNlambda— paste the function ARNsms
In local emulation, all subscriptions are confirmed immediately regardless of protocol.
Publish Message tab
Section titled “Publish Message tab”Send a message to the topic:
{ "event": "high_cpu", "instance": "i-0abc123", "value": 95.2}An optional Subject field is available for email-protocol subscribers.
Attributes tab
Section titled “Attributes tab”Shows all topic metadata via GetTopicAttributes:
| Key | Description |
|---|---|
| TopicArn | Full ARN |
| SubscriptionsConfirmed | Active subscriber count |
| SubscriptionsPending | Awaiting confirmation |
| FifoTopic | true if FIFO |
| ContentBasedDeduplication | Enabled for FIFO topics |
| DisplayName | Optional display name for email |
| KmsMasterKeyId | KMS key if encryption enabled |
SDK integration
Section titled “SDK integration”import boto3
sns = boto3.client("sns", endpoint_url="http://localhost:4566", region_name="us-east-1", aws_access_key_id="test", aws_secret_access_key="test")
# Create standard topicarn = sns.create_topic(Name="system-alerts")["TopicArn"]
# Create FIFO topicfifo_arn = sns.create_topic( Name="order-events.fifo", Attributes={"FifoTopic": "true", "ContentBasedDeduplication": "true"})["TopicArn"]
# Subscribe SQSsns.subscribe(TopicArn=arn, Protocol="sqs", Endpoint="arn:aws:sqs:us-east-1:000000000000:my-queue")
# Publishsns.publish(TopicArn=arn, Message='{"event": "alarm"}', Subject="Alert")