In this example we are going to use Localstack and Golang to work with AWS Simple Notification Service (SNS). We will create a new topic, list all topics, subscribe to a topic, list all topic subscriptions, publish to a topic and unsubscribe from a topic.

Structure

├── internal
│   ├── pkg
│   │   └── cloud
│   │       ├── aws
│   │       │   ├── aws.go
│   │       │   └── sns.go
│   │       ├── client.go
│   │       └── model.go
│   └── pubsub
│       └── pubsub.go
└── main.go

#aws #go #golang

A simple AWS SNS example with Golang using Localstack
4.25 GEEK