How to Upload a File in an AWS S3 Bucket from ServiceNow

Written by Mohsin Farooq

Senior Software Engineer at Royal Cyber

Today companies prefer cloud storage over local. With many cloud platforms available in the market, there are times when integration between two platforms is necessary or needed.

The integration between ServiceNow and other cloud platforms boosts the efficiency of internal processes and automates operations. For example,

  • By integrating LDAP with ServiceNow, users can leverage a streamlined login process and get the benefits of a single sign-on.
  • ServiceNow integration with Amazon Web Services (AWS) Cloud provides comprehensive service lifecycle management. By using ServiceNow Cloud Management, enterprises have a single system of record for all their public and private cloud resources.

In this blog, we will be discussing the integration between ServiceNow and Amazon S3 (Simple Storage Service) using Amazon S3 spoke available in the ServiceNow Store.


In the past, integration between ServiceNow and AWS was done using the REST services, which was quite difficult because of the authentication requirements in AWS. Today a lot of spokes are available on the ServiceNow Store that can easily integrate with other cloud systems—Azure, Google Cloud, or AWS—available in the market. Most of these spokes are from ServiceNow, so organizations need no involvement of third parties.

Before we move further, let us first understand the two important terms used when integrating the two platforms.

Integration Hub:

IntegrationHub is a ServiceNow application that enables process automation and integrations using common outbound protocols (e.g., APIs (application programming interfaces), JDBC, or common line scripting and languages) to interact with external platforms. It enables the execution of third-party APIs as part of the flow when a specific event occurs in ServiceNow. These integrations, referred to as spokes, are easy to configure and enable you to quickly perform powerful actions without writing a script.

Flow Designer:

Flow Designer is a Now Platform feature for automating processes in a single design environment. It lets process owners use natural language to automate approvals, tasks, notifications, & record operations without coding.

How to Use Amazon S3

For AWS integration with ServiceNow, Amazon S3 spoke is one of the spokes available on the ServiceNow Store. It automatically manages buckets and objects on Amazon S3.

To use Amazon S3 spoke, you can use Flow designer in ServiceNow. Flow Designer runs every day at a specified time. After the flow designer is triggered, it will fetch all the records from the “Attachment” table that have a reference to the“Change_Request” table. In the next step, it will iterate on the records, pick every record from the “Change_Request” table by using its unique ID, and upload the attachment of that record to the S3 bucket. The same action is executed on every record until the records are finished.

How It Works

Some of the pre-requisites are:

  1. Select Amazon S3 spoke from the ServiceNow Store
  1. Set AWS credentials from Connections & Credentials > Credentials

Steps to Upload A File on Amazon S3 with ServiceNow

  1. Run Flow Designer at any time of the day
  2. Load the records from the “Attachment” Table which have a reference ID of the “Change_Request” table
  3. Start iterating on the records obtained in step #2
  1. Fetch the actual record from the “Change_Request” table against the ID you got in the second step.
  1. Upload the attachment you received in the fourth step to S3 using Amazon S3 spoke (Activation Required).
  1. The file is uploaded on Amazon S3


You can use other spokes available in the ServiceNow Store for uploading a file on Amazon S3. Some of the examples are Amazon IAM, Amazon SNS, Amazon Lambda to name a few. There are some spokes available for Microsoft Azure as well as the Salesforce.

How to Upload a File in an AWS S3 Bucket from ServiceNow

Leave a Reply