Amazon SNS
Analytics Plus can stream messages published to an Amazon SNS topic. Analytics Plus generates a unique Push URL for the stream table. Subscribe this URL to the topic, and SNS delivers each message as it is published.
Before you begin
- Stream Analytics is available only in the Enterprise edition of Analytics Plus.
- You need an AWS account with permission to create Amazon SNS topics and subscriptions.
- The SNS topic must receive JSON messages whose keys match the table column names exactly, including case.
Note: Use flat JSON. A nested object is stored in a single text column.
Creating the stream table
- Click Import Your Data at the top-right corner of the Home page.
- Select Streaming Data in the Category list, and click Amazon SNS.
- If the Import Streaming Data into Analytics Plus pane appears, click Proceed.
- Enter a Workspace Name if you started from the Home page.
- Click Copy next to Post to copy the Push URL, and click Next.

Note: The Push URL contains a secret key. Use it only as the endpoint of the SNS subscription.
Configuring Amazon SNS
- In the AWS Management Console, open the SNS topic and click Create subscription.
- Set Protocol to HTTPS, set Endpoint to the Push URL, and create the subscription. Analytics Plus confirms it automatically.
- Open the subscription, click Edit, select Enable raw message delivery, and click Save.
Note: Raw message delivery is required. Without it, SNS wraps the message in fields such as Type and Message, and those fields will not match the stream table.
Designing the table
| Option | Use it when | What happens |
| Design table manually | You know the message keys and data types. | Add each column yourself. |
| Provide sample data | You have a sample message. | Analytics Plus fills the columns from your JSON. |
| Fetch data automatically from source | You can publish messages now. | Analytics Plus listens for up to 120 seconds and fills the columns from received messages. |

Design the table manually
- Select Design table manually and click Next.
- Click + Add New Column for each JSON key and provide its name and data type.
Provide sample data
- Select Provide sample data.
- Paste a JSON object or array in Provide sample JSON.
- Click Next and review the generated columns.

Fetch data automatically from the source
- Confirm that raw message delivery is enabled.
- Select Fetch data automatically from source.
- Publish one or more messages. Analytics Plus listens for up to 120 seconds and fills the columns when a message arrives.

Note: If raw message delivery is disabled, Analytics Plus reads the SNS envelope fields instead of the message fields.
Reviewing table details
- Enter a unique Table Name.
- Review each column's name, data type, mandatory setting, default value, and personal-data setting.
- Add columns if required, and click Next.

Note: Check inferred number types. Use Decimal Number when the source can send decimal values.
Validating and importing data
- Optionally set the retention period and turn on Enable Historical Data.
- Click Validate & Import Streaming Data.
- Publish a matching message to the topic within 120 seconds.

When the message matches, the status changes to Consuming Streaming Data. If validation fails, review the Failure Reason(s), correct the issue, and click Validate Again.
Managing the data source
Open Data Sources in the workspace and select the Amazon SNS source. You can view the Push API URL, last fetched time, and stream status; validate, pause, or resume the stream; edit retention; and review failure details.

Regenerate Key creates a new Push URL and immediately disables the old URL. Create a new SNS subscription with the new URL, then delete the old subscription.
Note: An Amazon SNS data source holds one table. Start a new import for another table.
Retention and historical table
- Rows remain in the stream table for one hour by default. Set a retention period from 30 minutes to 24 hours.
- Enable Historical Data creates
{Stream table name} - Historical_Tableand copies each incoming row to it. - Turning off historical data stops new rows from being added but does not delete the existing table or its data.
Note: Historical table rows count toward the workspace row limit.
Streaming statuses
- Yet to be validated: The table is awaiting validation.
- Validating: Analytics Plus is listening for 120 seconds.
- Consuming: Data is being imported.
- Paused: The stream is paused.
- Validation Failed: No matching message arrived during validation.
- Failed: Repeated messages could not be processed. Correct the cause and resume.
Limits
- A stream table holds up to 1 million rows or one hour of data.
- An Amazon SNS source holds one table.
- Stream tables cannot be copied.
- Reports refresh about every 30 seconds; dashboards require a manual refresh.
Frequently asked questions
Why is the table empty even though messages are being published?
Raw message delivery is usually disabled. Enable it on the SNS subscription, validate the stream, and publish another message.
Do I need to confirm the SNS subscription?
No. Analytics Plus confirms the subscription automatically.
Does pausing a stream delete its data?
No. Existing rows remain until the retention period removes them.

