Receive events at your ServiceNow instance from Amazon SNS

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 9분
  • Receive events (Notification, Subscription Confirmation, and Unsubscribe Confirmation) from Amazon SNS at your ServiceNow instance.

    시작하기 전에

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

    이 태스크 정보

    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.

    시작하기 전에

    Role required: admin.

    프로시저

    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.
      Client Secret or Authorization Key

    Create a record in AWS Configurations

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

    시작하기 전에

    Role required: admin.

    프로시저

    1. Navigate to All > AWS Configuration > All Configurations.
    2. Click New.
    3. On the form, fill in the fields.
      표 1. AWS Configurations form
      Field Description
      Property Value Internal name of the Amazon SNS Subscription subflow. For example, amazon_sns_subscription.
      주:
      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 Name Name to identify the record.
      Client Secret Client Secret generated by the script. For information about generating Client Secret see, Create secret for the Amazon SNS spoke.
    4. Right-click the form header and click Save.
    5. 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.

    시작하기 전에

    Role required: admin.

    프로시저

    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.

    시작하기 전에

    Role required: admin.

    프로시저

    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:
      Field Description
      Region AWS geographic area where the infrastructure is housed.
      Topic Name Name 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.

    시작하기 전에

    Role required: admin.

    프로시저

    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:
      Field Description
      Region AWS geographic area where the infrastructure is housed.
      Topic ARN ARN to uniquely identify the required topic. Subscriptions are created for this topic.
      Protocol HTTPS
      Endpoint Endpoint URL in this format: https://<servicenow-instance>.service-now.com/<base-api-path>/<aws-configuration-sys_id>/<client-secret>.
    3. Test the flow.
      The flow internally triggers the default Amazon SNS Subscription subflow.
    4. In the Executions tab, open the record associated with the subflow execution.
      주:
      Ensure that you check the execution details of the default Amazon SNS Subscription subflow, not the flow you had created.
    5. In the Execution Details page, click RUNTIME VALUE.
    6. Copy and record the value of Token for later use.
      This confirmation token is needed to Confirm subscription.
      Token in Runtime value.
      주:
      Ensure that you use the confirmation token to Confirm subscription within its validity period.

    결과

    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.

    시작하기 전에

    Role required: admin.

    프로시저

    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:
      Field Description
      Region AWS geographic area where the infrastructure is housed.
      Topic ARN ARN to uniquely identify the required topic. Subscriptions are created for this topic.
      Token Confirmation token generated after creating subscription. See Create subscription, for more information.
      주:
      Ensure that you use the confirmation token to confirm subscription within its validity period.
    5. Test the flow and check the Executions tab to ensure that flow is executed as expected.

    결과

    The Amazon SNS subscription for your ServiceNow instance is confirmed.