Integrations

ServiceNow AWS Integration Guide

advancedAWS IAM Access Key and Secret Key with role-based permissionsAmazon Web Services

The ServiceNow AWS integration enables comprehensive cloud infrastructure management by connecting ServiceNow's IT Service Management capabilities with Amazon Web Services. This integration solves critical visibility and governance challenges for organizations running workloads in AWS by providing automated discovery of AWS resources, incident management for AWS services, and streamlined provisioning workflows. IT operations teams, cloud architects, and service desk analysts rely on this integration to maintain accurate CMDB data and respond quickly to AWS service events. The integration supports bi-directional data flows through the AWS Service Management Connector, enabling ServiceNow to discover and track AWS resources as Configuration Items while also allowing incident creation from AWS CloudWatch alarms and Lambda function triggers via SNS/SQS messaging. The primary automation pattern involves real-time event processing through AWS EventBridge and scheduled CMDB discovery jobs, with core functionality residing in the Configuration Management and IT Operations Management modules.

Prerequisites

  • ServiceNow Quebec or later instance with Integration Hub Professional license
  • AWS account with IAM administrative access to create service accounts and policies
  • ServiceNow AWS Service Management Connector application from the ServiceNow Store
  • Active MID Server with internet connectivity for AWS API communication
  • AWS CLI configured with appropriate credentials for initial setup verification
  • ServiceNow Discovery plugin activated for CMDB population
  • AWS CloudFormation execution permissions for Service Catalog integration

Architecture Overview

The ServiceNow AWS integration primarily uses the AWS Service Management Connector spoke within Integration Hub, supplemented by custom REST Message configurations for advanced use cases. Authentication is established through AWS IAM roles and access keys stored in ServiceNow Connection & Credential Aliases, with credentials encrypted using ServiceNow's credential store. Data flows bi-directionally with AWS APIs pushing events through SNS/SQS to ServiceNow Scripted REST APIs, while ServiceNow pulls resource data through scheduled discovery jobs and on-demand Integration Hub actions. A MID Server is required for most operations as it provides secure communication between ServiceNow and AWS APIs, especially for VPC-private resources and discovery operations. AWS API rate limits vary by service but typically allow 5,000-10,000 requests per second, with the integration implementing exponential backoff and retry logic through the AWS Service Management Connector's built-in throttling mechanisms.

Sourdough
Chrome Extension

Sourdough: ServiceNow Monitoring and Analytics

A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.

Instance HealthGraphs & ChartsAPI HealthDeveloper ToolsQuick SearchInstance Switcher
Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Implementation Steps

1

Install AWS Service Management Connector from ServiceNow Store

Navigate to System Applications > All Available Applications > All in the ServiceNow Store and search for 'AWS Service Management Connector'. Click Install and accept the license terms, ensuring you have Integration Hub Professional licensing available. The installation process will automatically create the necessary tables, workflows, and Integration Hub spokes required for AWS connectivity. After installation completes, verify the AWS spoke appears in Integration Hub by navigating to Integration Hub > Connections & Credentials > Spokes and confirming 'Amazon Web Services' is listed with an Active status.

2

Create AWS IAM user and policies for ServiceNow integration

Log into AWS Console and navigate to IAM > Users > Add User to create a dedicated service account named 'servicenow-integration'. Select 'Programmatic access' to generate access keys and attach policies including 'AmazonEC2ReadOnlyAccess', 'AmazonRDSReadOnlyAccess', and 'AmazonS3ReadOnlyAccess' for basic discovery capabilities. For advanced features like incident management and provisioning, also attach 'CloudWatchReadOnlyAccess' and 'AWSServiceCatalogEndUserFullAccess'. Download the CSV file containing the Access Key ID and Secret Access Key immediately after creation, as the secret key cannot be retrieved later.

3

Configure AWS credentials in ServiceNow Connection and Credential Aliases

Navigate to Connections & Credentials > Credentials and click New to create a new credential record. Set the Type to 'AWS Credentials' and enter a descriptive name like 'AWS Production Account'. In the AWS Access Key ID field, paste the access key from the downloaded CSV, and in the AWS Secret Access Key field, enter the secret key from AWS. Test the credential by clicking 'Test Credential' to verify ServiceNow can authenticate with AWS APIs successfully.

4

Create Connection Alias for AWS Service Management Connector

Navigate to Connections & Credentials > Connection & Credential Aliases and create a new alias named 'AWS_Production_Connection'. Set the Type to 'AWS Connection' and select the AWS credential created in the previous step from the Credential dropdown. Configure the Default AWS Region field to match your primary AWS region (e.g., 'us-east-1') and set the Connection URL to 'https://aws.amazon.com'. Enable the Active checkbox and save the record, then test the connection using the Test Connection button to validate API connectivity.

5

Configure AWS Discovery schedules for CMDB population

Navigate to Discovery > Discovery Schedules and create a new schedule named 'AWS EC2 Discovery'. Set the Type to 'Cloud Discovery' and select 'Amazon Web Services' as the Cloud Provider. Configure the Connection Alias to use the AWS connection created in step 4, and set the MID Server to an active MID Server with internet connectivity. In the Discovery Configuration section, enable the resource types you want to discover (EC2 Instances, RDS Databases, S3 Buckets) and set the schedule to run daily during off-peak hours to minimize API usage impact.

6

Set up AWS EventBridge integration for real-time incident creation

In AWS Console, navigate to Amazon EventBridge > Rules and create a new rule for CloudWatch alarm state changes. Configure the event pattern to match CloudWatch alarm state changes and set the target to an SNS topic that will forward events to ServiceNow. In ServiceNow, navigate to System Web Services > Scripted REST APIs and create a new API named 'AWS_Incident_Webhook' with a POST method to receive and process AWS events. Configure the Scripted REST API to parse incoming SNS notifications and automatically create incident records with appropriate assignment groups and priority based on alarm severity.

ServiceNow Script
var requestBody = JSON.parse(request.body.dataString);
var snsMessage = JSON.parse(requestBody.Message);
var incident = new GlideRecord('incident');
incident.short_description = 'AWS Alarm: ' + snsMessage.AlarmName;
incident.description = snsMessage.AlarmDescription;
incident.priority = snsMessage.NewStateReason.includes('ALARM') ? '2' : '4';
incident.assignment_group = 'AWS Operations Team';
incident.caller_id = gs.getUserID();
var incidentSysId = incident.insert();
return incidentSysId;
7

Configure AWS Service Catalog integration for service provisioning

Navigate to Service Catalog > Catalog Definitions and create a new catalog item for AWS resource provisioning. Configure the item to use Integration Hub AWS actions by adding Flow Designer workflows that call the AWS Service Management Connector spoke actions like 'Launch EC2 Instance' or 'Create RDS Database'. Set up approval workflows using ServiceNow's approval engine to require manager approval for high-cost resources based on estimated monthly costs. Configure the catalog item variables to capture necessary AWS parameters like instance type, security groups, and subnet selections while providing dropdown lists populated from AWS APIs.

ServiceNow Script
var awsAction = new sn_fd.FlowAPI();
var launchResult = awsAction.getRunner('AWS Service Management Connector', 'Launch EC2 Instance')
  .withInput('instance_type', current.variables.instance_type)
  .withInput('ami_id', current.variables.ami_id)
  .withInput('subnet_id', current.variables.subnet_id)
  .withInput('security_group_ids', current.variables.security_groups)
  .withInput('connection_alias', 'AWS_Production_Connection')
  .run();
current.work_notes = 'AWS EC2 instance launch initiated: ' + launchResult.instanceId;
8

Test integration functionality and validate data flows

Execute the AWS discovery schedule manually by navigating to Discovery > Discovery Schedules, selecting your AWS schedule, and clicking 'Discover Now'. Monitor the discovery progress in Discovery > Discovery Status and verify that AWS resources appear as Configuration Items in the CMDB by checking Configuration > Servers > All Servers for EC2 instances. Test the incident creation workflow by manually triggering a CloudWatch alarm in AWS and confirming that an incident is automatically created in ServiceNow with the correct details and assignment. Validate the service catalog integration by submitting a test request for AWS resource provisioning and ensuring the Integration Hub flow executes successfully.

ServiceNow Script
var gr = new GlideRecord('cmdb_ci_ec2_instance');
gr.addQuery('install_status', 'Installed');
gr.query();
gs.info('Found ' + gr.getRowCount() + ' active EC2 instances in CMDB');
while (gr.next()) {
  gs.info('EC2 Instance: ' + gr.name + ', State: ' + gr.instance_state + ', Type: ' + gr.instance_type);
}

Common Use Cases

Automated CMDB discovery and maintenance of AWS infrastructure

Scheduled discovery jobs automatically scan AWS accounts to identify EC2 instances, RDS databases, S3 buckets, and other resources, creating corresponding Configuration Items in ServiceNow's CMDB. The discovery process captures detailed attributes like instance types, security groups, tags, and relationships between resources, maintaining an accurate inventory for change management and incident response. This use case provides critical visibility for IT operations teams managing hybrid cloud environments and ensures compliance with asset management policies.

Real-time incident creation from AWS CloudWatch alarms

AWS CloudWatch alarms automatically trigger ServiceNow incident creation through EventBridge and SNS integration when infrastructure issues occur. The incidents are populated with relevant context including alarm details, affected resources, and metric thresholds, enabling faster response times from operations teams. Priority and assignment group mapping based on alarm severity ensures critical production issues receive immediate attention while routine warnings are handled appropriately.

Self-service AWS resource provisioning through Service Catalog

Development teams request AWS resources like EC2 instances, RDS databases, and S3 buckets through ServiceNow's Service Catalog, with approval workflows ensuring cost control and compliance. Integration Hub flows automatically provision approved resources using AWS APIs while capturing provisioning details and costs in ServiceNow records. This use case enables controlled cloud adoption while maintaining governance and providing audit trails for all resource provisioning activities.

Change management integration for AWS infrastructure modifications

AWS infrastructure changes are tracked through ServiceNow's Change Management process, with integration points capturing planned modifications from AWS CloudFormation deployments and infrastructure-as-code pipelines. Change records automatically link to affected Configuration Items and include deployment logs and rollback procedures from AWS. This ensures all infrastructure changes follow organizational change control processes regardless of deployment method.

Cost optimization workflows driven by AWS billing data

AWS Cost Explorer and billing data feeds into ServiceNow to trigger cost optimization workflows when spending thresholds are exceeded or unused resources are detected. Automated workflows create tasks for resource owners to review and justify continued usage of expensive resources, while generating reports for finance teams on cloud spending trends. This use case helps organizations maintain cost discipline while scaling their AWS usage through data-driven optimization processes.

Troubleshooting

AWS Discovery jobs fail with 'InvalidAccessKeyId' or 'SignatureDoesNotMatch' errors

First verify the AWS Access Key ID and Secret Access Key in the ServiceNow credential record are correctly copied from AWS without any trailing spaces or special characters. Navigate to MID Server > Servers and check the MID Server logs for detailed authentication error messages that may indicate clock skew issues. Ensure the MID Server system time is synchronized with NTP and the AWS IAM user has not been deactivated or had permissions modified since the credential was created.

EventBridge integration receives events but incidents are not created in ServiceNow

Check the ServiceNow System Logs under System Logs > System Log > All for any script errors in the Scripted REST API processing SNS messages. Verify the SNS topic subscription confirmation was completed by checking AWS SNS console for subscription status and ensuring the ServiceNow endpoint is accessible from AWS. Test the Scripted REST API directly using a REST client to confirm it can parse sample SNS message payloads and create incident records successfully.

Integration Hub AWS actions timeout or return 'Connection timeout' errors

Navigate to Integration Hub > Connections & Credentials > Connection & Credential Aliases and test the AWS connection to verify basic connectivity. Check that the MID Server has outbound HTTPS access to AWS API endpoints by testing connectivity from the MID Server host to amazonaws.com on port 443. Review AWS CloudTrail logs to confirm API calls are reaching AWS services and check for any throttling or rate limiting responses that might cause timeouts.

AWS resources discovered but Configuration Items missing critical attributes or relationships

Review the Discovery Pattern configuration for AWS resources by navigating to Discovery > CI Classification and verify the mapping rules are correctly extracting attributes from AWS API responses. Check that the AWS IAM permissions include 'Describe' permissions for all resource types being discovered, as insufficient permissions can result in partial data collection. Use Discovery > Discovery Log to examine the raw data returned from AWS APIs and identify any missing attributes in the API responses.

Service Catalog AWS provisioning flows fail with permission denied errors

Verify the AWS IAM user or role used by ServiceNow has the necessary permissions to create the requested resource types by testing the same operations manually in AWS CLI or console. Check AWS CloudTrail for the specific API calls and error messages when ServiceNow attempts resource creation. Ensure the target VPC, subnets, and security groups specified in the catalog item exist and are accessible from the ServiceNow integration account's permissions.

Duplicate Configuration Items created for the same AWS resources

Navigate to Discovery > Identification and Reconciliation Rules to review the identification rules for AWS CI classes and ensure they are configured to match on unique AWS resource identifiers like Instance ID or ARN. Check for multiple discovery schedules targeting the same AWS account or regions that could be creating duplicate records. Use the Duplicate CI Remediator to identify and merge existing duplicate records while refining the identification rules to prevent future duplicates.

Pro Tips

  • Configure AWS CloudTrail integration to automatically create Change Records for infrastructure modifications by parsing CloudTrail logs through AWS Lambda functions that POST to ServiceNow's Table API. This provides complete audit trails for all AWS changes regardless of how they were performed.
  • Use AWS Systems Manager Parameter Store to centrally manage ServiceNow connection details and automate credential rotation by having Lambda functions update ServiceNow credential records when AWS access keys are rotated. This enhances security while reducing manual maintenance overhead.
  • Implement custom Business Rules on AWS Configuration Item tables to automatically trigger security compliance checks when new resources are discovered, such as validating security group configurations or ensuring proper tagging standards are followed.
  • Leverage ServiceNow's Predictive Intelligence capabilities to analyze historical AWS alarm patterns and proactively identify potential infrastructure issues before they trigger critical alerts, enabling preventive maintenance workflows.
  • Create custom Integration Hub actions that combine multiple AWS API calls to implement complex provisioning workflows, such as creating EC2 instances with all required networking, security, and monitoring configurations in a single Service Catalog request.
  • Use AWS Cost and Usage Reports delivered to S3 and processed through scheduled ServiceNow imports to maintain detailed cost allocation records linked to Configuration Items, enabling accurate chargeback and cost center reporting.

Known Limitations

  • AWS API rate limits vary by service but generally allow 5,000-10,000 requests per second with burst capabilities, requiring careful scheduling of discovery jobs and implementation of exponential backoff in custom integrations. Large AWS environments may require multiple discovery schedules spread across different time windows to avoid throttling.
  • The AWS Service Management Connector spoke requires Integration Hub Professional licensing and does not support all AWS services out of the box, particularly newer services or those in preview. Custom Integration Hub actions or REST Message configurations are needed for unsupported services.
  • Real-time event processing through SNS/SQS introduces latency of 2-5 seconds under normal conditions but can experience delays during AWS service disruptions. EventBridge rules have limits of 300 rules per account per region, which may require careful planning for large-scale integrations.
  • CMDB discovery of AWS resources in private VPCs requires MID Server deployment within the VPC or proper VPC peering/transit gateway configuration, adding network complexity and potential security considerations. Some AWS resource metadata is only available through specific API calls that require elevated permissions.
  • AWS CloudFormation and Terraform integration requires custom development as the out-of-box connector does not automatically track infrastructure-as-code deployments. Change tracking for IaC-deployed resources requires additional webhook configuration and custom Scripted REST API development.

Frequently Asked Questions

Can ServiceNow manage multiple AWS accounts and regions simultaneously?

Yes, ServiceNow supports multiple AWS accounts through separate Connection & Credential Aliases for each account, with discovery schedules configured per account and region combination. You can create distinct credentials for each AWS account and configure separate discovery patterns and schedules to maintain clear separation of resources in the CMDB. The AWS Service Management Connector supports cross-account role assumptions for centralized management while maintaining proper access controls and audit trails.

How does ServiceNow handle AWS resource lifecycle management and decommissioning?

ServiceNow automatically updates Configuration Item states based on AWS resource states discovered during scheduled scans, marking terminated instances as 'Retired' and stopped instances as 'Non-Operational'. You can configure Business Rules to trigger decommissioning workflows when AWS resources are terminated, ensuring proper asset tracking and security group cleanup. The integration maintains historical records of decommissioned resources for audit purposes while allowing automatic cleanup of retired CIs after configurable retention periods.

What is the recommended approach for handling AWS costs and billing integration?

The most effective approach involves configuring AWS Cost and Usage Reports to deliver detailed billing data to S3, then using ServiceNow's scheduled imports to process this data into custom tables linked to Configuration Items. This enables accurate cost allocation, chargeback reporting, and automated workflows for cost optimization. You can also integrate AWS Budgets API through custom Integration Hub actions to create ServiceNow incidents when spending thresholds are exceeded, enabling proactive cost management.

How should we handle AWS security events and compliance monitoring through ServiceNow?

Integrate AWS SecurityHub and GuardDuty findings through EventBridge to automatically create Security Incident records in ServiceNow with appropriate severity and assignment. Configure AWS Config rules to monitor compliance and send non-compliance events to ServiceNow for remediation tracking through the change management process. Use custom Business Rules on AWS Configuration Items to automatically validate security configurations like security group rules and encryption settings against organizational policies.

Can ServiceNow automatically scale AWS resources based on service management events?

While ServiceNow can trigger AWS scaling actions through Integration Hub flows and Lambda functions, automatic scaling should primarily use AWS native services like Auto Scaling Groups and Application Auto Scaling. ServiceNow is better suited for approval-driven scaling workflows where capacity increases require business justification and cost approval. You can create Service Catalog items for scaling requests that trigger automated AWS API calls after appropriate approvals are obtained.

What is the best practice for managing AWS IAM permissions for the ServiceNow integration?

Create dedicated IAM roles for ServiceNow with least-privilege permissions based on required functionality, using separate roles for read-only discovery versus provisioning activities. Implement AWS IAM Access Analyzer to regularly review and optimize permissions, and configure AWS CloudTrail to monitor ServiceNow API usage for security auditing. Use AWS IAM permission boundaries to limit maximum permissions and consider implementing time-limited sessions through AWS STS assume-role patterns for enhanced security.

How does the integration handle AWS service outages and API unavailability?

The AWS Service Management Connector implements automatic retry logic with exponential backoff for transient failures, while discovery schedules can be configured to skip failed attempts and continue with the next scheduled run. ServiceNow maintains the last known state of AWS resources in the CMDB when AWS APIs are unavailable, and you can configure monitoring to alert operations teams when discovery jobs consistently fail. Integration Hub provides detailed error logging and notification capabilities to ensure AWS connectivity issues are promptly identified and resolved.

Test Your Knowledge

Quick 3-question quiz — see how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue