Skip to main content

Replaying AWS SNS

Background​

Amazon SNS has an HTTPS API, so Speedscale records SNS calls as ordinary HTTP calls and replays and mocks them like any other API.

For more information about Amazon SNS, see the Amazon SNS documentation.

What is recorded​

  • A publisher sends Publish or PublishBatch. The request is form-encoded, with the message in its Message parameter.
  • An HTTP or HTTPS subscription receives each notification as a POST that SNS sends to your app. Those are inbound requests, so a replay sends them to your app again as tests.

Record it like any HTTPS dependency. In Kubernetes, the sidecar records the calls once it decrypts outbound TLS, and the eBPF collector reads them without TLS interception. Locally, run your app with proxymock record and set HTTPS_PROXY and the proxymock CA as the language reference shows for your runtime.

Mock and replay​

Your app's calls to the service are outbound, so a replay answers them from the recording, like any other API your app calls. A publisher's Publish calls get their recorded responses.

SNS delivers each message to every subscription on the topic, so a message you publish to a real topic reaches all of them.

Write your own load driver​

To publish the recorded messages to the service yourself, with your own pacing, extract them from a snapshot and send them with a small producer. Write your own load driver has the extraction path and producer code in Go, Java, TypeScript and Python.

Loading search...