Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Receive events at your ServiceNow instance from Amazon SNS

Receive events (Notification, Subscription Confirmation, and Unsubscribe Confirmation) from Amazon SNS at your ServiceNow instance.

Before you begin

  • Request an Integration Hub subscription
  • Activate the Amazon SNS spoke
  • Role required: admin

About this task

You can receive events at your ServiceNow instance from Amazon SNS even without setting up the Amazon SNS spoke. To set up the Amazon SNS spoke and use the spoke actions, see Set up the Amazon SNS spoke.

Create secret for the Amazon SNS spoke

Create a client secret to authorize requests from Amazon SNS.

Before you begin

Role required: admin.

Procedure

  1. Navigate to All > System Definition > Scripts - Background.

  2. Enter this command in the Run script (JavaScript executed on server) text field:

    gs.info(GlideSecureRandomUtil.getSecureRandomString(32));

  3. Click Run Script.

  4. Copy and record the generated value for later use.

Image omitted: auth-token.png
Client Secret or Authorization Key

Create a record in AWS Configurations

Create a record in AWS Configurations to authorise requests from Amazon SNS spoke.

Before you begin

Role required: admin.

Procedure

  1. Navigate to All > AWS Configuration > All Configurations.

  2. Click New.

  3. On the form, fill in the fields.

FieldDescription
Property ValueInternal name of the Amazon SNS Subscription subflow. For example, amazon_sns_subscription.Note: The Amazon SNS Subscription subflow is a sample subflow. You must create a copy of this subflow and use it to customize event management as per your requirement. In this case, specify the internal name of the customized subflow.
Property NameName to identify the record.
Client SecretClient Secret generated by the script. For information about generating Client Secret see, Create secret for the Amazon SNS spoke.
  1. Right-click the form header and click Save.

  2. Right-click the form header and click Copy sys_id. Record this value for later use.

Record the Base API path of the Amazon SNS spoke

Record the Base API path of the Amazon SNS spoke to authorise requests from Amazon SNS.

Before you begin

Role required: admin.

Procedure

  1. Navigate to All > System Web Services > Scripted Web Services > Scripted REST APIs.

  2. Open the record for Amazon SNS.

  3. Copy and record the value of Base API path for later use.

Create topic

Use the Create Topic spoke action to create a topic in Amazon SNS for your ServiceNow instance.

Before you begin

Role required: admin.

Procedure

  1. In Workflow Studio, create a flow and include the Create Topic spoke action.

    For information about creating flows in Workflow Studio, see Building flows.

  2. Customize flow to provide these values as inputs to the Create Topic spoke action:

    FieldDescription
    RegionAWS geographic area where the infrastructure is housed.
    Topic NameName to identify the topic.
  3. Test the flow and check the Executions tab to ensure that flow is executed as expected.

Create subscription

Use the Create Subscription spoke action to create subscription in Amazon SNS for your ServiceNow instance.

Before you begin

Role required: admin.

Procedure

  1. In Workflow Studio, create a flow and include the Create Subscription spoke action.

    For information about creating flows in Workflow Studio, see Building flows.

  2. Customize flow to provide these values as inputs to the Create Subscription spoke action:

FieldDescription
RegionAWS geographic area where the infrastructure is housed.
Topic ARNARN to uniquely identify the required topic. Subscriptions are created for this topic.
ProtocolHTTPS
EndpointEndpoint URL in this format: https://<servicenow-instance>.service-now.com/<base-api-path>/<aws-configuration-sys_id>/<client-secret>.Note: For information about obtaining the required values, see Record the Base API path of the Amazon SNS spoke, Create a record in AWS Configurations, and Create secret for the Amazon SNS spoke.
  1. Test the flow.

    The flow internally triggers the default Amazon SNS Subscription subflow.

  2. In the Executions tab, open the record associated with the subflow execution.

    Note: Ensure that you check the execution details of the default Amazon SNS Subscription subflow, not the flow you had created.

  3. In the Execution Details page, click RUNTIME VALUE.

  4. Copy and record the value of Token for later use.

    This confirmation token is needed to Confirm subscription.

Image omitted: runtime-value-sns.png
Token in Runtime value.
**Note:** Ensure that you use the confirmation token to [Confirm subscription](notification-sns.md) within its validity period.

Result

Subscription for the required topic in Amazon SNS for your ServiceNow instance is created.

Confirm subscription

Use the Confirm Subscription spoke action to confirm subscription in Amazon SNS for your ServiceNow instance.

Before you begin

Role required: admin.

Procedure

  1. In Workflow Studio, create a copy of the default Amazon SNS Subscription subflow.

    For information about using subflows in Workflow Studio, see Building subflows.

  2. In Workflow Studio, create a flow that includes the copy of the default subflow.

    For information about creating flows in Workflow Studio, see Building flows.

  3. Customize the subflow to include the Confirm Subscription spoke action.

  4. Customize subflow to provide these values as inputs to the Confirm Subscription spoke action:

FieldDescription
RegionAWS geographic area where the infrastructure is housed.
Topic ARNARN to uniquely identify the required topic. Subscriptions are created for this topic.
TokenConfirmation token generated after creating subscription. See Create subscription, for more information.Note: Ensure that you use the confirmation token to confirm subscription within its validity period.
  1. Test the flow and check the Executions tab to ensure that flow is executed as expected.

Result

The Amazon SNS subscription for your ServiceNow instance is confirmed.