Skip to content
Back to main site

Amazon SNS

Create topics, subscribe local SQS queues and publish messages with raw or enveloped delivery.

Plan: Free42 of 42 operations implemented5Known differences

Subscription filter policies are accepted but did not filter delivery to SQS in testing of Vera 1.2.0 preview.

Example checked on Vera 1.2.2, 8 November 2026. Each coverage note names its own evidence and date.

This Free service needs no license key. Start Vera as in Get started, then run this in a terminal of its own, from an empty scratch directory. It gives the official AWS CLI dummy credentials and a config file of its own, so no AWS account is needed and your own AWS profile isn't touched.

Terminal window
export VERA_ENDPOINT="http://localhost:5003"
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test
export AWS_REGION=us-east-1 AWS_DEFAULT_REGION=us-east-1
export AWS_SHARED_CREDENTIALS_FILE=/dev/null
export AWS_EC2_METADATA_DISABLED=true
export AWS_PAGER="" AWS_CLI_AUTO_PROMPT=off
unset AWS_PROFILE AWS_DEFAULT_PROFILE
unset AWS_SESSION_TOKEN AWS_SECURITY_TOKEN
unset AWS_WEB_IDENTITY_TOKEN_FILE AWS_ROLE_ARN AWS_ROLE_SESSION_NAME
unset AWS_CONTAINER_CREDENTIALS_FULL_URI
unset AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
cat > vera-aws-config <<'EOF'
[default]
region = us-east-1
output = json
cli_binary_format = base64
s3 =
addressing_style = path
EOF
export AWS_CONFIG_FILE="$PWD/vera-aws-config"

When you've finished every example in this terminal, close it and delete vera-aws-config, not before.

Use the AWS CLI’s sns commands. The emulator serves the 2010-03-31 API over the AWS Query protocol. The example also uses sqs commands for the queue it subscribes.

Topic ARNs follow AWS’s pattern in your instance’s account, such as arn:aws:sns:us-east-1:123456789012:vera-docs-topic. An SQS subscription names its queue by ARN, which the example looks up. The queue and topic stay in the emulator, and no real AWS identity is involved.

Create a queue and look up its ARN, create a topic and subscribe the queue to it, publish a message, then receive it from the queue. The subscription asks for raw delivery and a filter policy that matches a kind attribute of refund, and the message carries that attribute. The emulator accepts the filter, but it doesn’t filter: see Limitations.

Terminal window
QUEUE_URL=$(aws --endpoint-url "$VERA_ENDPOINT" sqs create-queue \
--queue-name vera-docs-sns-target --query QueueUrl --output text)
QUEUE_ARN=$(aws --endpoint-url "$VERA_ENDPOINT" sqs get-queue-attributes \
--queue-url "$QUEUE_URL" --attribute-names QueueArn \
--query Attributes.QueueArn --output text)
TOPIC_ARN=$(aws --endpoint-url "$VERA_ENDPOINT" sns create-topic \
--name vera-docs-topic --query TopicArn --output text)
SUBSCRIPTION_ARN=$(aws --endpoint-url "$VERA_ENDPOINT" sns subscribe \
--topic-arn "$TOPIC_ARN" --protocol sqs \
--notification-endpoint "$QUEUE_ARN" \
--return-subscription-arn \
--attributes '{"RawMessageDelivery": "true", "FilterPolicy": "{\"kind\": [\"refund\"]}"}' \
--query SubscriptionArn --output text)
aws --endpoint-url "$VERA_ENDPOINT" sns publish --topic-arn "$TOPIC_ARN" \
--message 'example.net matching' \
--message-attributes '{"kind": {"DataType": "String", "StringValue": "refund"}}'
aws --endpoint-url "$VERA_ENDPOINT" sqs receive-message \
--queue-url "$QUEUE_URL" --wait-time-seconds 0

With raw delivery, the queue receives the published message itself, example.net matching, not an SNS envelope, and the kind attribute comes with it. These are selected fields; the MessageId and ReceiptHandle differ on every run.

Output (selected fields)
{
"Messages": [
{
"Body": "example.net matching",
"MessageAttributes": {
"kind": {
"StringValue": "refund",
"DataType": "String"
}
}
}
]
}

To clean up, remove the subscription, then the topic and the queue:

Terminal window
aws --endpoint-url "$VERA_ENDPOINT" sns unsubscribe --subscription-arn "$SUBSCRIPTION_ARN"
aws --endpoint-url "$VERA_ENDPOINT" sns delete-topic --topic-arn "$TOPIC_ARN"
aws --endpoint-url "$VERA_ENDPOINT" sqs delete-queue --queue-url "$QUEUE_URL"
  • Topics, created and deleted.
  • SQS subscriptions: subscribing a queue by its ARN, reading the subscription’s attributes and unsubscribing.
  • Publishing to SQS subscribers: a published message reaches the subscribed SQS queue at once.
  • Raw delivery: with RawMessageDelivery set to true, the queue receives the message body itself, with the tested string message attribute. Without it, the queue receives a reduced SNS Notification envelope: see Limitations.
  • Topic attributes: in recorded comparisons from 3 November 2026, selected SetTopicAttributes updates matched AWS’s responses, successful and error responses alike.
  • Attribute reads, confirmation and permissions, on errors only: in the same recorded comparisons, GetTopicAttributes, SetSubscriptionAttributes, ConfirmSubscription, AddPermission and RemovePermission matched AWS’s error responses. Successful confirmation, complete attribute behavior and permission enforcement weren’t established.
  • Also served, not yet tested: batch publishing, data protection policies, tags and SMS sandbox numbers. Mobile push applications and endpoints and SMS settings were compared only on validation, which differs: see Limitations.

The main limits are below. A few more apply to every service, and the API coverage notes cover smaller differences.

  • Filter policies are ignored. In Vera 1.2.0 preview, a subscription whose FilterPolicy matches kind refund also received a message published with kind order.
  • The envelope without raw delivery is reduced. With raw delivery off, the queue received a Notification envelope holding only Type, TopicArn, Message and SignatureVersion: no message signature, and none of the published message attributes.
  • Attribute maps are rejected. In recorded comparisons from 3 November 2026, CreatePlatformApplication, SetEndpointAttributes and SetSMSAttributes answered MissingParameter for an Attributes map the request supplied. These were validation checks: mobile push and SMS delivery weren’t tested.
  • Terraform topic refresh fails with the tested provider. On Vera 1.2.0-rc.3, GetTopicAttributes omitted Policy for a topic created without an explicit policy. With Terraform 1.15.8 and AWS provider 6.69.0, topic creation was followed by parsing policy: unexpected end of JSON input; normal destroy also failed during refresh. Direct API topic deletion worked. Other provider versions and explicit-policy configurations were not checked.
  • Only SQS subscribers were tested. HTTP or HTTPS, email, SMS and mobile push subscriptions weren’t, and neither were FIFO topics, successful subscription confirmation, delivery retries or dead-letter queues.

AWS describes raw delivery in Amazon SNS raw message delivery. The test used one string attribute, so it doesn’t establish AWS’s limits on the number of attributes.

Every operation in AWS's published 2010-03-31 API (SDK model, botocore 1.43.105), and whether the emulator implements it. Availability combines the earlier implementation inventory with the dated observations below; checking a page's example does not verify every operation. Each note names its evidence first; an observation given without a build or date comes from earlier testing, on 3 November 2026. What the statuses mean

OperationStatusNotes
AddPermissionImplemented
CheckIfPhoneNumberIsOptedOutImplemented
ConfirmSubscriptionImplemented
CreatePlatformApplicationKnown differenceRecorded comparison: The tested request supplies Attributes, but the emulator rejects the map as missing with MissingParameter. The AWS recording instead rejects its credential values with InvalidParameter. This is a negative validation comparison, not working mobile push delivery.
CreatePlatformEndpointImplemented
CreateSMSSandboxPhoneNumberImplemented
CreateTopicImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Created the example's topic and returned its ARN.
DeleteEndpointImplemented
DeletePlatformApplicationImplemented
DeleteSMSSandboxPhoneNumberImplemented
DeleteTopicImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Deleted the example's topic.
GetDataProtectionPolicyImplemented
GetEndpointAttributesImplemented
GetPlatformApplicationAttributesImplemented
GetSMSAttributesImplemented
GetSMSSandboxAccountStatusImplemented
GetSubscriptionAttributesImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Returned the attributes of an SQS subscription.
GetTopicAttributesKnown differenceLocal observation: Vera 1.2.0-rc.3, 6 November 2026 — a newly created topic without an explicit policy returned attributes without Policy. Terraform 1.15.8 with AWS provider 6.69.0 failed reading it with parsing policy: unexpected end of JSON input; normal destroy failed during refresh too. Direct API topic deletion worked. Other provider versions and explicit-policy configurations were not checked.
ListEndpointsByPlatformApplicationImplemented
ListOriginationNumbersImplemented
ListPhoneNumbersOptedOutImplemented
ListPlatformApplicationsImplemented
ListSMSSandboxPhoneNumbersImplemented
ListSubscriptionsImplemented
ListSubscriptionsByTopicImplemented
ListTagsForResourceImplemented
ListTopicsImplemented
OptInPhoneNumberImplemented
PublishKnown differenceLocal observation: Vera 1.2.0 preview, 5 November 2026 — Ignores subscription filter policies: a subscription filtering on kind refund also received a publication with kind order. Without RawMessageDelivery, an SQS subscriber received a reduced Notification envelope with Type, TopicArn, Message and SignatureVersion, without a message signature or the published message attributes. Raw delivery worked: see Subscribe.
PublishBatchImplemented
PutDataProtectionPolicyImplemented
RemovePermissionImplemented
SetEndpointAttributesKnown differenceRecorded comparison: For the tested request with Attributes and an invalid endpoint identifier, the emulator returns MissingParameter for Attributes; the AWS recording returns InvalidParameter for the endpoint. A successful platform-endpoint lifecycle was not compared.
SetPlatformApplicationAttributesImplemented
SetSMSAttributesKnown differenceRecorded comparison: The tested attributes map succeeds in the AWS recording but is rejected by the emulator with MissingParameter.
SetSubscriptionAttributesImplemented
SetTopicAttributesImplemented
SubscribeImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Accepts FilterPolicy and RawMessageDelivery. Raw SQS delivery worked with the body and a string message attribute; FilterPolicy did not filter the tested nonmatching publication.
TagResourceImplemented
UnsubscribeImplementedLocal observation: Vera 1.2.0 preview, 5 November 2026 — Removed the example's SQS subscription.
UntagResourceImplemented
VerifySMSSandboxPhoneNumberImplemented