SNS
Topics, subscriptions, fan-out delivery, filter policies, platform applications.
fakecloud implements 42 of 42 SNS operations at 100% Smithy conformance.
Supported features
- Topics — CRUD, attributes, tags, policies
- Subscriptions — CRUD with confirmation flow, filter policies, raw message delivery
- Fan-out delivery — SQS, Lambda, HTTP/HTTPS subscriptions actually deliver
- Filter policies — JSON filter matching on message attributes and body
- Platform applications — iOS/Android/FCM/APNS endpoints (recorded for introspection, not sent)
- Message deduplication — via attribute
- FIFO topics — ordering, group IDs
- Signed message delivery — HTTP/HTTPS deliveries carry a real RSA-SHA256
SignatureplusSigningCertURLpointing at the in-process cert server (/_fakecloud/sns/signing-cert), so subscribers running the standardSns::MessageVerifier-style flow round-trip end-to-end. The signed canonical string follows AWS's documented field order (Message,MessageId,Subject,Timestamp,TopicArn,Type, andToken/SubscribeURLfor subscription confirmations) andSignaturedecodes to a valid signature over that string with the served public key. - Email subscriptions via SMTP relay — when
FAKECLOUD_SNS_SMTP_RELAY=host:portis set,emailandemail-jsonsubscriptions deliver via SMTP to the configured relay (e.g. MailHog, Mailpit) so end-to-end SNS-to-email tests run without a real SES account. Unset, email subscriptions remain recorded-only at/_fakecloud/sns/messagesto preserve the LocalStack-style hermetic default.
Protocol
Query protocol. Form-encoded body, Action parameter, XML responses.
Introspection
GET /_fakecloud/sns/messages— list all published messagesGET /_fakecloud/sns/pending-confirmations— list subscriptions pending confirmationPOST /_fakecloud/sns/confirm-subscription— force-confirm an SNS subscription
Cross-service delivery
- SNS -> SQS / Lambda / HTTP — Fan-out delivery to all subscription types
Gotchas
- SMS delivery is not real. Messages to SMS endpoints are recorded for introspection at
/_fakecloud/sns/messagesbut never actually sent. There's no SMS gateway. - Email delivery is opt-in. By default, email and email-json subscriptions are recorded-only at
/_fakecloud/sns/messages. SetFAKECLOUD_SNS_SMTP_RELAY=host:portto deliver to a real SMTP relay (MailHog, Mailpit, or production SES); without it nothing leaves the process. If you need full inbound/outbound email testing with parsing semantics, use SES instead.