Provision products and raise patch change requests in AWS via ServiceNow

The main architectural value here is not the individual provisioning or patching step, but the control plane pattern that ties them together. By using ServiceNow as the request and approval front end while AWS handles execution through Service Catalog, Systems Manager, and CloudTrail, teams can keep familiar ITSM processes without forcing operators to leave the service management workflow.

That separation, however, creates an integration dependency chain. The solution relies on synchronized identities, matching roles, approved change templates, event store configuration, and carefully scoped IAM permissions. In practice, the weakest link is usually not the automation document itself but the configuration consistency across ServiceNow and AWS. If those mappings drift, requests may appear successful in ITSM while execution fails or becomes hard to trace.

For platform teams, the operational trade-off is between standardization and flexibility. A prebuilt workflow reduces ad hoc manual steps and improves auditability, but it also makes the patch path more opinionated. Teams adopting this model should expect to align catalog design, change governance, and approval logic with AWS resource life cycles, rather than treating the connector as a simple plug-in.

Security and resilience considerations are equally important. The connector introduces additional access keys, user roles, and cross-system permissions that should be reviewed as part of the deployment baseline. CloudTrail-backed visibility helps with post-change investigation, but only if event capture is configured from the start and the event data store remains queryable. For enterprise operations, the real benefit is repeatable control with traceable execution, not just faster provisioning.


ServiceNow

ย is a popular cloud-based IT Service Management (ITSM) platform. Organizations use ServiceNow to manage incidents, track scheduled and planned infrastructure changes, manage new service requests and track configuration items across IT systems. Common questions Iโ€™ve had from customers include how they can use ServiceNow to provision new instances. Or, how to use ServiceNow to implement patches forย 

AWS

ย resources while still using ServiceNow defined change management workflows. Fortunately, AWS provides the โ€˜AWS Service Management Connector (SMC) for ServiceNowโ€™, where customers can implement these use cases natively in ServiceNow. The AWS SMC also supports use cases including incident and configuration management. You can refer toย AWS Service Management Connector for ServiceNowย documentation for more details.

In this blog, we walk through the steps to set up and configure a web server, then patch the instance using the pre-configured ServiceNow workflow.ย For this use case, we provision a new NGINX web server product, raise a change request to patch the web server instance, and view the associated AWS events.

Overview of solution

Diagram showing the blog solution architecture overview

ย 
ย 

The solution is composed of the following components:

  1. The ServiceNowย Personal Developer Instance (PDI)ย provides the user interface to provision a new product and raise a change request.
  2. The AWS Service Management Connector (SMC) application will be installed and configured in the ServiceNow PDI.
  3. When we order a new web server product within the ServiceNow service catalog, the AWS SMC calls AWS Service Catalog to provision a new EC2 instance.
  4. When we raise a change request in ServiceNow, the AWS SMC calls AWS Systems Manager Change Manager to initiate a change request and run an automation document (runbook) to patch the instance. The runbook uses AWS CloudFormation templates and AWS Lambda functions.
  5. AWS Systems Manager also captures events associated with the change request in an AWS CloudTrail event store, which can be queried via SQL.

Walkthrough

The steps to deploy the solution can be summarized in the following order:

  • Deploy the CloudFormation template to set up the baseline permissions and IAM users.
  • Install the AWS Service Management Connector application in ServiceNow.
  • Configure AWS Service Catalog integration in ServiceNow required to provision a new product.
  • Configure AWS Systems Manager Automation and Systems Manager Change Manager integration required to raise a new patch management change request.
  • Validate the solution by provisioning a new NGINX web server and raising a change request to patch the web server instance.
  • Validate the change request details.
  • Clean up resources.

Prerequisites

For this walkthrough, you should have the following prerequisites:

Create baseline permission and IAM users in AWS

  1. To create the users and permissions, use the CloudFormation template from theย AWS Service Management Connector documentation.
  2. The template creates an AWS Sync User and AWS End User. Make note of the SCEndUserAccessKey, SCEndUserSecretAccessKey, SCSyncUserAccessKey, and SCSyncUserSecretAccessKey values from the stack output. These will be used when configuring the AWS Account within ServiceNow.

Configure ServiceNow components

  1. The ServiceNow steps are performed using the admin user credentials created as part ofย obtaining a PDIย process.
  2. Activate the โ€˜User Criteria Scoped APIโ€™ plugin by navigating to the system โ€˜Pluginsโ€™ page. Search for โ€˜User Criteriaโ€™. If the plugin is already installed, select the plugin to verify it is active.ย Note:ย Clear the ServiceNow platform cache first.
  3. Activate the โ€˜Discovery and Service Mapping Patternsโ€™ plugin by searching for the โ€˜Discovery and Service Mapping Patternsโ€™ application and installing it.
  4. Activate the โ€˜Change Management โ€“ Change Model Foundation Dataโ€™ plugin by searching for โ€˜Change Managementโ€™. If the plugin is already installed, select the plugin to verify itโ€™s active.

Install ServiceNow Connector scoped application

  1. From the ServiceNow PDI, we will use an โ€˜Update Setโ€™ to install the AWS Service Management Connector.
  2. Download theย ServiceNow Update Set. From the โ€˜Retrieved Update Setsโ€™, select the โ€˜Import Update Set from XMLโ€™ and upload the XML file.
  3. Preview and โ€˜Commit the Retrieved Update Setโ€™ to install the connector.

Configure AWS Service Catalog integration in ServiceNow

  1. Underย โ€˜System Definitionโ€™ > โ€˜Choice Listsโ€™, create discovery source and configure platform tables, by adding an entry into the Configuration Item (CI) table for the AWS SMC to report discovered CIs into the CMDB.
  2. Set permissions on ServiceNow Platform by modifying the โ€˜Application Accessโ€™ for the ServiceNow Service Catalog table so that the AWS products will display under AWS portfolios as subcategories.
  3. Underย โ€˜System Definitionโ€™ > โ€˜Tablesโ€™, search for and select the โ€˜Catalog Item Categoryโ€™ table. Check the boxes โ€˜Can createโ€™, โ€˜Can updateโ€™, โ€˜Can deleteโ€™.

Configure ServiceNow permissions and add AWS products in ServiceNow

  1. Underย โ€˜System Securityโ€™ > โ€˜Users and Groupsโ€™ > โ€˜Usersโ€™, edit the userโ€™s role by adding ServiceNow permissions required for managing automation and change manager templates, accessing CloudTrail events, searching AWS Service Catalog products and portfolios, and managing AWS accounts.
  2. Underย โ€˜Self-Serviceโ€™ > โ€˜Service Catalogโ€™, add the โ€˜AWS Service Catalogโ€™ product to the ServiceNow Service Catalog.

Configure Systems Manager Change Manager Integration in ServiceNow

  1. Underย โ€˜System Definitionโ€™ > โ€˜Choice Listsโ€™, add an entry into the Change Request table with a label of โ€˜AWS Change Requestโ€™ and value of โ€˜AWSChangeRequestโ€™.
  2. Enable AWS Systems Manager Change Manager integration Change models by setting the following properties under โ€˜sys_properties.listโ€™:
    • โ€˜com.snc.change_management.change_model.type_compatibilityโ€™ = โ€˜trueโ€™.
    • โ€˜com.snc.change_management.change_model.hideโ€™ = โ€˜falseโ€™.

Configure AWS Accounts in ServiceNow to synchronize data with AWS

  1. Underย โ€˜AWS Service Management Connectorโ€™ > โ€˜Setupโ€™ > โ€˜AWS Accountsโ€™, create a new AWS Account (for example, โ€˜smc-cloudopsโ€™). Use the access key and secret key for the โ€˜SyncUserโ€™ and โ€˜EndUserโ€™ (created in the CloudFormation stack creation step earlier). Check the boxes to integrate with AWS Service Catalog, AWS Config, AWS Systems Manager Automation, and Systems Manager Change Manager.
  2. Validate the connectivity of the newly created AWS Account.

Verify the โ€˜SMC Example Portfolioโ€™ in AWS

  1. In theย AWS Management Console, underย โ€˜AWS Service Catalogโ€™ > โ€˜Portfoliosโ€™, there will be a โ€˜SMC Example Portfolioโ€™ that was created when the CloudFormation template โ€˜smc-iam-setup.jsonโ€™ was run earlier.
  2. Selecting the โ€˜SMC Example Portfolioโ€™ will show two products: โ€˜Simple S3 Private Bucketโ€™ and โ€˜Demo NGINX Webserverโ€™.

Configure permissions for sample end user (Abel Tuter) in ServiceNow

  1. In the ServiceNow PDI, underย โ€˜Users and Groupsโ€™ > โ€˜Groupsโ€™, create a new group record called โ€˜Order_AWS_Productsโ€™ and add the sample user โ€˜Abel Tuterโ€™ to the group.
  2. Underย โ€˜AWS Service Management Connectorโ€™ > โ€˜AWS Service Catalogโ€™ > โ€˜Portfoliosโ€™, add a new group called โ€˜Order_AWS_Productsโ€™ to the โ€˜SMC Example Portfolioโ€™.

Provision a new Web Server in AWS via the ServiceNow Service Catalog

  1. Weโ€™re now ready to provision a new AWS service via ServiceNow. Log in to the ServiceNow PDI using the sample user โ€˜abel.tuterโ€™. From the landing page, select โ€˜Service Catalogโ€™ under โ€˜Self-Serviceโ€™.
  2. Select the โ€˜Demo NGINX Webserverโ€™.

Diagram showing ServiceNow AWS Service Catalog with the 'Demo NGINX Webserver' product.

ย 
ย 
  1. The NGINX web server product details page will request input parameters. These include the product name, the Virtual Private Cloud (VPC) to deploy the web server, the instance type, and any required tagging information. Click on the โ€œCreate planโ€ to view the resources to be provisioned.

Diagram showing ServicNow input parameters for the 'Demo NGINX Webserver' product, with the option to create a plan.

ย 
ย 
  1. The Resource Changes shows that a new security group and EC2 instance will be created as part of this product. Select โ€˜Order Nowโ€™, to provision the product.

Diagram showing the 'Demo NGINX Webserver' product, with resource changes and the option to order now.

ย 
ย 
  1. Confirmation page showing that the request has been submitted. Select the โ€˜Request Numberโ€™ link, and view details of the request.

Diagram showing the confirmation page for the product

ย 
ย 
  1. Requested Item page showing that it has been approved and currently in โ€˜Fulfilmentโ€™ stage.

Diagram showing the approval state for the item.

ย 
ย 
  1. Log in to theย AWS Management Console. Under the EC2 service, confirm that a new EC2 instance running NGINX web server has been successfully created. Copy the public IPv4 DNS and open it in a new browser window.

Diagram showing the AWS Console EC2 service with the web server instance

ย 
ย 
  1. The browser shows the default landing page. We have now successfully created a NGINX web server.

Diagram showing the NGINX web server home page on the browser.

ย 
ย 

Configure AWS Systems Manager Automation integration in ServiceNow

  1. Now that we have provisioned an Amazon EC2 instance via the ServiceNow Service Catalog, this next section will describe how to raise a change request in ServiceNow. This will help you to apply patch updates to the web server. First, we will configure ServiceNow integration with AWS Systems Manager Automation, which is required in order to run the patch update automation document.
  2. In the PDI, underย โ€˜System Propertiesโ€™ > โ€˜AWS Systems Managerโ€™ > โ€˜Systems Manager Automationโ€™, verify that the โ€˜AWS Systems Manager โ€“ Execute Automation Documentโ€™ workflow exists by navigating to โ€˜Workflow Editorโ€™.
  3. Filter workflows by โ€˜AWSโ€™ and view the โ€˜AWS Systems Manager โ€“ Execute Automation Documentโ€™ workflow, along with other workflows created by the Service Management Connector Application.

Diagram showing the ServiceNow workflow for AWS Systems Manager Execute Automation Document.

ย 
ย 
  1. Assign additional permissions to the โ€˜SCEndUserโ€™ to stop and update EC2 instances. In theย AWS Management Console, underย โ€˜IAMโ€™ > โ€˜Usersโ€™, add an inline policy that contains permissions allowing the โ€˜SCEndUserโ€™ to stop/start EC2 instances and retrieve AWS Systems Manager documents.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "ec2:StopInstances",
                "ec2:StartInstances",
                "ssm:GetDocument"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}
  1. Underย โ€˜Systems Managerโ€™ > โ€˜Change Managerโ€™, create a standard change template to patch an EC2 instance using the โ€˜AWS-PatchInstanceWithRollbackโ€™ runbook provided by AWS.ย Note:ย If Change Manager has not been set up for the account, refer toย Setting up Change Managerย for details.
  2. Enable auto-approval, as this is required for the connector to synchronize change templates and add an IAM user as the first level approver. Submit the change template for review.
  3. The template must be in an โ€˜Approvedโ€™ state before it is synchronized by the connector, so navigate to the โ€˜blog-patch-templateโ€™ and select โ€˜Approveโ€™.

Configure AWS Systems Manager Change Manager integration in ServiceNow

  1. In theย AWS Management Console, underย โ€˜CloudTrailโ€™ > โ€˜Lakeโ€™ > โ€˜Event data storesโ€™, create event data store. Check the โ€˜Management eventsโ€™ box.
  2. In theย ServiceNow PDI, underย โ€˜System Propertiesโ€™ > โ€˜AWS Systems Managerโ€™ > โ€˜AWS Systems Manager Change Managerโ€™, verify that the AWS Systems Manager Change Manager role matches the โ€˜ServiceNowChangeManagerโ€™ role that was created as part of the CloudFormation template โ€˜smc-iam-setup.jsonโ€™ executed earlier. Update the โ€œEvent Data Store Nameโ€™ with the event data store created in the previous steps.
  3. Underย โ€˜AWS Systems Managerโ€™ > โ€˜Change Templatesโ€™, verify the โ€˜blog-patch-templateโ€™ has been synchronized from AWS Systems Manager Change Manager.

Create a new change request from ServiceNow

  1. Weโ€™re now ready to create a new change request to patch our web server via ServiceNow. Log in to theย Personal Developer Instance (PDI)ย using the โ€˜adminโ€™ user and selectย โ€˜Changeโ€™ > โ€˜Create Newโ€™.

Diagram showing navigation to create new change

  1. Select the option to make changes to AWS resources using Change Manager Templates.

Diagram showing ServiceNow screen to make changes to AWS resources using Change Manager Templates

ย 
ย 
  1. Select the โ€˜blog-patch-templateโ€™ as the change request template.

Diagram showing the ServiceNow AWS Systems Manager Change Manager with blog-patch template

ย 
ย 
  1. Enter the instance ID of the NGINX web server created earlier and โ€˜Submitโ€™.

Diagram showing the input parameters for the blog-patch-template

ย 
ย 
  1. In the change request form, select an โ€˜Assignment groupโ€™ and then select โ€˜Request Approvalโ€™.

Diagram showing the first page of the ServiceNow change request form

ย 
ย 
  1. Approve the change request.

Diagram showing the authorise stage of the ServiceNow change request form

ย 
ย 

Diagram showing the ServiceNow approve request

ย 
ย 
  1. The change request progresses to the โ€˜Scheduledโ€™ stage. Select โ€˜Implementโ€™.

Diagram showing the scheduled stage of the ServiceNow change request form

ย 
ย 
  1. In the โ€˜Change Tasksโ€™ tab at the bottom, the implementation task state is โ€˜In Progressโ€™.

Diagram showing the implement stage of the ServiceNow change request form

ย 
ย 

Diagram showing the ServiceNow change task status

ย 
ย 
  1. You can also view the workflow execution states in graphical form.

Diagram showing the AWS Change Request workflow execution

ย 
ย 
  1. After the change request completes, check the โ€˜AWS Statusโ€™ attribute for โ€˜CompleteWith Successโ€™.

Diagram showing the closed stage of the ServiceNow change request form with the option to Sync CloudTrail Events

ย 
ย 
  1. You can also verify that the automation execution associated with the change request was successfully implemented by navigating to โ€˜Automation Executionsโ€™.

Diagram showing navigation to Automation Executions

  1. The Automation Executions show that the โ€˜blog-patch-templateโ€™ document โ€˜Completed with Successโ€™.

Diagram showing blog-patch execution status completed with success.

ย 
ย 

View the change request details in AWS

  1. We can view the change request details in AWS by querying the โ€˜smc-change-store-1โ€™ event store we created earlier. In theย AWS Management Console, selectย โ€˜CloudTrailโ€™ > โ€˜Lakeโ€™. In the Editor, issue a query on the event store where the โ€˜sourceIPAddressโ€™ equals โ€˜ssm.amazonaws.comโ€™ to view the events generated by the change request.

Diagram showing the AWS Console CloudTrail lake query editor

ย 
ย 
  1. Additionally, you can view the events for the โ€˜PatchInstanceWithRollbackโ€™ stack in CloudFormation.

Diagram showing the AWS Console CloudFormation events

ย 
ย 

Cleaning up

To avoid incurring future charges, remove the resources by deleting NGINX web server instance and disabling change requests/scheduled jobs in ServiceNow.

About the Author

ย 

Bill Chan

Bill is an Enterprise Solutions Architect working with large enterprises to craft highly scalable, flexible, and resilient cloud architectures. He helps organizations understand best practices around advanced cloud-based solutions, and how to migrate existing workloads to the cloud. He enjoys relaxing with family and shooting hoops.

ย 

ย 

Original Post

Extract ServiceNow data using AWS Glue Studio in an Amazon S3 data lake and analyze using Amazon Athena

Enjoyed this article? Sign up for our newsletter to receive regular insights and stay connected.