> For the complete documentation index, see [llms.txt](https://knowledgebase.fabricdata.com/fabric-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.fabricdata.com/fabric-knowledge-base/api/integrating-with-fabric-studio/amazon-simple-notification-service-sns.md).

# Amazon Simple Notification Service (SNS)

## Amazon Simple Notification Service (SNS) Message Format

Event messages from the Fabric Studio Amazon SNS Topic are formatted in SNS format - for guidance on parsing SNS messages see:

{% embed url="<https://docs.aws.amazon.com/sns/latest/dg/sns-message-and-json-formats.html>" %}

### Sample Fabric Record SNS Message

```jsx
{
  "Type": "Notification",
  "MessageId": "d75de600-5f7b-4db0-9c3b-aa6f00e485e9",
  "TopicArn": "arn:aws:sns:[AWS Region]:[AWS Account ID]:meta-record-state",
  "Subject": "Meta Live: Record SH00000001 id-created",
  "Message": {
    "action": "id-created",
    "metaId": "SH00000001",
    "catalogs": [],
    "category": "Show",
    "first_release_year": 2023,
    "original_title": "My Awesome Movie",
    "createdDate": "2023-11-01T14:56:16Z",
    "lastUpdatedDate": "2023-12-01T14:56:16Z",
    "actors": [],
    "status": "approved",
    "parentShowMetaId": "",
    "season_number": "",
    "episode_number": ""
  },
  "Timestamp": "2023-12-02T14:56:16Z",
  "SignatureVersion": "1",
  "Signature": "hKDfpAiPBaiJXdE8/njQZF5rPCBr2RRJ6IuAt6fuPtgDUU5M15n4VMzxmqnAh6KU8muqz+DrwIusgxz3s/bA/GkBfCjpe/I2qyvXSiNrx4WzdSwlhtiGvQS1FUsEUrgpXjrr5gwOhZPgq1/nddA8MG/y1S8lPL2Z7t5V/dNecjDfHFmt8d6v2nYZFx6Xz5VOLTK9Ef7ehgny83NlNaQbaHM8OfUcIb4H8NemFP8mciLDVdurj9BTuVJ0PjA3tNdCXX++lWlll0xNp0KYhbFkQmUeDl9m62WS6m+lt1MgXtIn2Ub4Ep6lOnx4sgwzzToWzJrEkyL82cGD05ayxNiP7g==",
  "SigningCertURL": "<https://sns.us-west-1.amazonaws.com/SimpleNotificationService-01d088a6f77103d0fe307c0069e40ed6.pem>",
  "UnsubscribeURL": "<https://sns.us-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-1:783621318331:meta-record-state:fe45757c-d9fe-4765-900c-0ddfdd6beccf>"
}
```

### Message Fields

Standard Fabric Record SNS Messages contain the following fields:

* action - the record action that has occurred
* metaId - the ID for the record
* catalogs - the catalog(s) that the record is associated with
* category - the category for the record (e.g. Show, Season, Episode, Feature)
* first\_release\_year - the first release year for the title the record represents
* original\_title - the original title for the title the record represents
* createdDate - the creation date of the record
* lastUpdatedDate - the date the record was last updated
* status - the status of the record

Additional fields are included depending on environment configuration. Further, customers may configure custom fields using *Record Builder* and include these fields in the SNS messages if desired (see below for guidance on configuring *Record Builder* fields and including them in SNS).

## Using Standard Message Fields to Trigger External Custom Integrations and Actions

By listening to the SNS Topic, consumers can take action based on values in any of the standard message fields. For example, `status`, is a commonly used attribute to trigger custom integrations and actions. The SNS messages can be monitored for `action: updated` and `status: approved` for example to trigger external activity that should occur when a title record has been approved in Fabric Studio. Similarly, messages that don’t meet the consumer criteria would be ignored. In this way, customers can custom build integrations around Fabric Studio and introduce custom business logic as necessary.

## Adding a Source Attribute for Downstream SNS Filtering

SNS subscription filter policies evaluate Message Attributes, not HTTP headers or the JSON body. To enable consistent, downstream filtering (e.g., to separate system-initiated events from user-initiated ones), publish Fabric Studio events with a Source message attribute (string). Think of this as a standardized “source header” carried alongside the message.

### What to Publish

* Attribute name: Source
* Type: String&#x20;
* Examples: studio, api, notrigger-palantir, backfill, task-manager, admin-ui, script:content-sync

> Note: SNS filter policies are case sensitive. Keep values lowercase/kebab-case for consistency.

## Coming Soon! Using Custom Record Builder Fields in SNS to Trigger External Custom Integrations and Actions

Check out this tutorial, to learn how to include Record Builder Fields in SNS:

{% content-ref url="/pages/j0OGq1kGU9Kn7HIb0gYp" %}
[Coming Soon! Include Record Builder Fields in SNS](/fabric-knowledge-base/api/integrating-with-fabric-studio/amazon-simple-notification-service-sns/coming-soon-include-record-builder-fields-in-sns.md)
{% endcontent-ref %}
