Reference: AWS: Simple Notification Service

dependencies {
    
    implementation(platform("org.http4k:http4k-bom:6.36.0.0"))

    implementation("org.http4k:http4k-connect-amazon-sns")
    implementation("org.http4k:http4k-connect-amazon-sns-fake")
}

The SNS connector provides the following Actions:

  • CreateTopic
  • DeleteTopic
  • ListTopics
  • Publish
  • PublishBatch

The client APIs utilise the http4k-platform-aws module for request signing, which means no dependencies on the incredibly fat Amazon-SDK JARs. This means this integration is perfect for running Serverless Lambdas where binary size is a performance factor.

Example usage

Default Fake port: 58430

To start:

Kotlin fake.kt
package content.ecosystem.connect.reference.amazon.sns

import org.http4k.chaos.start
import org.http4k.connect.amazon.sns.FakeSNS

val sns = FakeSNS().start()
scarf