
Populating the ServiceNow CMDB with AWS Resources
Part 1 of 6: Core Guide — Service Graph Connector, Data Model and IRE
Series: ServiceNow on AWS (9 articles)
- 1Populating the ServiceNow CMDB with AWS Resources This article
With the retirement of the AWS Service Management Connector, this guide will help you set up CMDB population via the ServiceNow Service Graph connector. Enhancement, modifications, and MID servers are discussed in the broader series of these documents.
How to read this guide: Most of this document is descriptive. Step-by-step instructions appear only where you change a default behavior or configuration; those sections are marked “Step-by-step”. Product menus and table names reflect recent ServiceNow releases (Xanadu/Yokohama/Zurich) and the Service Graph Connector for AWS v2.x. Always confirm them against your instance version.
The series
Part 1: Core Guide — Service Graph Connector, Data Model and IRE (this document)
Part 2: CSDM, Tag-Based Mapping and Ticket Routing
Part 3: Extending the Service Graph Connector for IAM
Part 4: Pattern-Based Discovery and Comparison with the Service Graph Connector
Part 5: Near Real-Time CMDB Updates with AWS Config, EventBridge and SNS
Part 6: Governance and Additional Tools
What this document covers
1. Introduction and key concepts
2. The AWS Service Graph Connector (SGC)
3. Mapping AWS resources into the CMDB data model
4. The role of RTE and IRE
Appendix: References
Contents
1. Introduction and Key Concepts
1.1 Why put AWS resources in the CMDB?
The Configuration Management Database (CMDB) is ServiceNow’s system of record for the technology an organization runs. Each item in the CMDB is a Configuration Item (CI): a server, a database, a load balancer, an S3 bucket, an AWS account. AWS resources change often. They are created by automation, scaled up and down, and deleted within minutes. A CMDB that is filled in by hand cannot keep up. Automated discovery keeps the CMDB current. Mapping the discovered resources to the business applications they support is what turns that inventory into something useful for operations. With it, ServiceNow can route an incident to the right team, assess the risk of a change, attribute cost, and show audit evidence.
1.2 Key terms
Term | What it means |
|---|---|
CI / CI class | A Configuration Item is one record in the CMDB. Its class (for example cmdb_ci_vm_instance ) is the table and type that define which attributes it has. |
Service Graph Connector for AWS (SGC / SG-AWS) | A certified ServiceNow Store application. It pulls AWS inventory into the CMDB through AWS APIs, mainly AWS Config, without a MID Server. |
AWS Config / Config Aggregator | An AWS service that records the configuration of resources as “configuration items”. An Aggregator collects that data from many accounts and Regions in one place. |
AWS Systems Manager (SSM) agent | An agent on EC2 instances. It reports OS-level inventory (installed software, processes, TCP connections) and can run commands. |
MID Server | A Java application that ServiceNow customers host themselves, for example on an EC2 instance. It runs ServiceNow Discovery patterns against AWS APIs and hosts. |
IntegrationHub ETL (IH-ETL) | The guided tool used to view and edit how source data is transformed and mapped into CMDB classes. |
RTE (Robust Transform Engine) | The engine that applies the ETL transform maps to staged data and builds a payload for IRE. |
IRE (Identification and Reconciliation Engine) | The gatekeeper for all CMDB writes. It decides whether a record is new or already exists, prevents duplicates, and settles which source may update which attribute. |
CSDM (Common Service Data Model) | ServiceNow’s standard model for linking technical CIs to the application services, business applications, and business services they support. |
Service Mapping / tag-based mapping | ServiceNow capabilities that group CIs into application services. Tag-based mapping groups them by cloud tags such as Application=Payroll . |
1.3 Big-picture data flow
Each discovery method covered in this guide follows the same pattern. Data is collected from AWS, staged in ServiceNow, transformed, reconciled by IRE, and written to the CMDB. CSDM and Service Mapping then link the CIs to business applications.



2. The AWS Service Graph Connector (SGC)
With the retirement of the AWS Service Management Connector , the AWS Service Graph Connector from ServiceNow provides connectivity to Amazon Config and Systems Manager for resource discovery and is installed from the ServiceNow Store. It is set up through a Guided Setup wizard (search Service Graph Connector for AWS > Setup in the navigator). It is designed for multi-account AWS Organizations. A single ServiceNow IAM user in the management account, or in a designated member account, assumes a role in each member account. Through those roles it reads inventory across the whole Organization. No MID Server is needed. The connector calls AWS public APIs over HTTPS directly from the ServiceNow instance.
2.1 How SGC is authorized in AWS
During Guided Setup you download a set of AWS CloudFormation templates. These templates create the identities and permissions the connector needs. The key templates are:
Template | Purpose |
|---|---|
CreateServiceNowUser.yml | Creates the ServiceNow IAM user and an STS assume-role policy. It does not grant Config access directly. |
CreateSnowOrganizationAccountAccessRoleInMemberAccount.yml | Creates SnowOrganizationAccountAccessRole in each member account. Grants Config and Config Aggregator read ( config:ListDiscoveredResources , SelectResourceConfig , BatchGetResourceConfig , DescribeConfigurationAggregators , SelectAggregateResourceConfig , BatchGetAggregateResourceConfig ), plus Organizations, EC2 describe, SSM inventory and SendCommand, tagging, and S3 read for command output. |
SnowDesignatedAccountAccessRoleInManagementAccount.yml | A role in the management account for Organizations and EC2 read access only. |
SSM templates | SSM automation roles, SSM documents (shell, PowerShell, kubectl scripts), and an option to enable AWS Config. |
The ServiceNow knowledge articles KB2184482 and KB2247863 (SG-AWS FAQ) contain the current template set and cross-account guidance.
2.2 Where SGC gets its data
AWS Config and the Config Aggregator (primary source)
For most resource types, SGC reads AWS Config configuration items. When a Config Aggregator is set up, SGC runs one query (
SelectAggregateResourceConfig / BatchGetAggregateResourceConfig ) against the Aggregator and gets resources from every account and Region in the Organization. A configuration item contains the full description of the resource: its attributes, its relationships to other resources (for example instance to subnet to VPC), and its tags. SGC uses the tags on the configuration item to fill the CMDB Key Value table ( cmdb_key_value ).AWS Config therefore has to be enabled and recording in every account and Region you want discovered. If Config does not record a resource type, SGC cannot import it through this path.
Resource Groups Tagging API — tag:GetResources (supplementary source)
ServiceNow reports that, for a few resource types, Config does not return tags in a form the connector can use. For these types SGC calls the Resource Groups Tagging API
GetResources instead. Today this mainly applies to Elastic Load Balancers, DynamoDB tables, and Lambda functions. SGC also needs ListDiscoveredResources access even when an Aggregator is used, because this is how it detects deleted resources and keeps AWS and the CMDB in step.| Important tag caveat
The Tagging API GetResources does not support IAM users or roles. The SG-AWS FAQ also lists tags as supported for “Generic Resources except IAM user, Auto Scaling.” If IAM ownership tags matter to you, see Part 3. |
|---|
Scheduled imports
SGC runs as a chain of Scheduled Data Imports. A parent job,
SG-AWS-Organization , runs first and then triggers its child jobs in order. Each job covers one resource family, so you can turn individual families on or off. The main jobs are:Scheduled import | Creates / populates |
|---|---|
SG-AWS-Organization, -Org-Units, -Service-Account(-Tags) | Cloud Organization, AWS Org Unit, Cloud Service Account CIs, and account tags |
SG-AWS-Datacenters, -VPC, -Subnets | AWS Data Center (Region), Cloud Network (VPC), Availability Zone, Cloud Subnet |
SG-AWS-Network-Interface, -Security-Group, -Storage-Volume, -Image-* | NICs, security groups, EBS volumes, AMIs (OS templates) |
SG-AWS-EC2, -Hardware-Type, -VM-Hw-Consolidation | VM Instance plus Server / Linux Server / Windows Server, IPs, storage mapping, instance types, RAM/CPU |
SG-AWS-ELB-V1 / -V2 | Cloud Load Balancer (Classic, Application, Network, Gateway) |
SG-AWS-RDS, -DynamoDb, -S3 | Cloud Database, DynamoDB Table, Cloud Object Storage |
SG-AWS-API-Gateway, -Lambda | Cloud Gateway, Cloud Function |
SG-AWS-Software-Inventory / -Software-Remove | Installed software from SSM (SAM or Software Instance tables) |
SG-AWS-Generic-Resources | Cloud Resource ( cmdb_ci_cmp_resource ) CIs for types on the inclusion allow-list |
2.3 Deep (vertical) discovery with the SSM agent
What AWS APIs report about an EC2 instance is limited to what AWS can see from outside it: instance type, AMI, network, state. To see inside the operating system, SGC uses AWS Systems Manager. This is called deep or vertical discovery:
• SSM Inventory collects installed applications and OS details on each managed instance. SGC reads this to fill the software installation tables and to classify the instance as a Linux Server or Windows Server, not a generic Server.
• SSM SendCommand runs ServiceNow-supplied SSM documents (shell or PowerShell). These collect data that Inventory does not provide: serial number, running processes, and TCP connections. The output is written to an S3 bucket, which SGC then reads.
• EKS / Kubernetes details can be collected through a kubectl SSM document.
Requirements for deep discovery: the SSM agent must be installed (it is preinstalled on many AWS AMIs). Each instance needs an instance profile with AmazonSSMManagedInstanceCore, plus extra privileges for SendCommand data. SSM Inventory must be enabled; it is off by default. AWS provides an automation that turns it on across the Organization from the management account. The ServiceNow SSM documents must also be deployed in every account and Region you want covered.
2.4 What data comes through Config and SSM
Source | Typical data brought into the CMDB |
|---|---|
AWS Config (via Aggregator) | Organization, OUs, accounts, Regions, AZs, VPCs, subnets, NICs, security groups, EBS volumes, AMIs, EC2 instances, load balancers, RDS, DynamoDB, S3, API Gateway, Lambda (function metadata), EKS/ECS/ECR container resources, plus their relationships and tags. Further Config-recorded types can be added through Generic Resources. |
Tagging API ( GetResources ) | Tags for ELB, DynamoDB, and Lambda |
SSM Inventory | OS name and version, installed applications and versions, OS classification (Linux/Windows), hardware details |
SSM SendCommand | Serial number, running processes, TCP connections. Supports application-level relationship inference. |
2.5 Limitations to understand
Not discovered by SGC by default
• IAM users, groups, roles, and policies. AWS Config can record them, but SGC filters them out. Note that the Config recorder excludes the IAM types by default as well. See Part 3.
• Any Config-recorded resource type that has no dedicated SGC job (for example many security, analytics, and messaging services). These can be added as generic Cloud Resource CIs through the Generic Resources allow-list, or with dedicated classes by extending the ETL (Section 3).
• IAM user and Auto Scaling tags on the Generic Resources path.
• Resources in accounts or Regions where AWS Config is not recording, or that the Aggregator does not include.
Not available from AWS Config (or SSM) at all
• Lambda function code and its internal dependencies. Config records function metadata (runtime, role, memory, layers, VPC) but not the code. SSM cannot run inside Lambda, so no vertical discovery is possible. A common workaround is to package functions as container images stored in ECR. SGC can discover ECR images.
• Inside-the-OS data for instances without a working SSM agent and instance profile, and any data from managed services where no agent can run (RDS, DynamoDB, and so on). Only the API-level configuration is available.
• Application-layer relationships (which process talks to which database) beyond what SSM process and TCP data allows. For full application dependency maps use MID Server pattern-based discovery (Part 4) or Service Mapping (Part 2).
• Tags on resource types that do not include tags in their Config configuration items. AWS notes that some types do not capture tag data.
• Real-time freshness. SGC is schedule-driven, so the CMDB is only as current as the last import. See Part 5 for event-based options.
3. Mapping AWS Resources into the CMDB Data Model
3.1 The default mapping
SGC ships with a certified mapping from each AWS resource type to a CMDB class, along with the relationships between them. The full list is in the ServiceNow documentation page “CMDB data mapping for AWS”. The most common mappings are:
AWS resource | Default CMDB class | Typical relationships |
|---|---|---|
AWS Organization / OU | Cloud Organization cmdb_ci_cloud_org / cmdb_ci_aws_org_unit | Org contains OUs contains Accounts |
AWS Account | Cloud Service Account cmdb_ci_cloud_service_account | Account hosts Regions (Data Centers) |
Region / AZ | cmdb_ci_aws_datacenter / cmdb_ci_availability_zone | Region contains AZs |
VPC / Subnet | Cloud Network cmdb_ci_network / cmdb_ci_cloud_subnet | VPC contains subnets; hosted on Data Center |
EC2 instance | VM Instance cmdb_ci_vm_instance plus Server / Linux Server / Windows Server | VM Instance virtualizes Server; uses NIC, volume, security group, image |
EBS volume / AMI / instance type | cmdb_ci_storage_volume / cmdb_ci_os_template / cmdb_ci_compute_template | Attached to VM |
Load balancer (ELB/ALB/NLB/GWLB) | Cloud Load Balancer cmdb_ci_cloud_load_balancer | Load balances to VM instances |
RDS / DynamoDB | Cloud Database cmdb_ci_cloud_database / cmdb_ci_dynamodb_table | Hosted on Data Center |
S3 bucket | Cloud Object Storage cmdb_ci_cloud_object_storage | Hosted on Data Center |
Lambda / API Gateway | Cloud Function cmdb_ci_cloud_function / Cloud Gateway cmdb_ci_cloud_gateway | Hosted on Data Center |
Other allow-listed types | Cloud Resource cmdb_ci_cmp_resource (generic) | Hosted on Data Center / Account |
Resource tags | Key Value cmdb_key_value (one row per key/value per CI) | Referenced by the CI |
You can see the definitions behind this mapping in IntegrationHub ETL. Each SGC scheduled import has an ETL transform map. The transform map defines how staging columns become CI attributes, which classes are built, and which relationships connect them.
| Best practice: never edit the shipped transform maps directly
Updates from the ServiceNow Store can overwrite changes to the SG-AWS application. Make customizations in a copy (clone) of the transform map, or in a separate scoped application, and test them again after every connector upgrade. Build and test in a sub-production instance and move changes forward with update sets. |
|---|
3.2 Step-by-step: edit (extend) the default mapping in IntegrationHub ETL
Use this when you want an AWS attribute or tag value that is already in the staged payload to land in a CMDB field. For example, you might copy the
CostCenter tag into the CI’s Cost center field, or map an RDS attribute that is not mapped today. Required role: cmdb_inst_admin , or admin .1. In a sub-production instance, go to All > IntegrationHub ETL (Workspace: CMDB Workspace > Integrations > IntegrationHub ETL).
2. Use the filter to find the SG-AWS transform map you want to change, for example SG-AWS-RDS. Open the menu next to it and choose Duplicate (or Copy). Give the copy a clear name, for example SG-AWS-RDS – Custom. From here on, work only in the copy.
3. Open the copy. The guided setup shows its stages: Basic Details > Import Source Data and Provide Sample > Prepare Source Data > Map to CMDB and Add Relationships > Preview and Run.
4. In Prepare Source Data, check that the source field you need is present in the sample data. If it is buried in JSON (for example
configuration.tags ), add a transform such as *Extract from JSON* or *Script*. This creates a new staged column (for example u_cost_center ).5. In Map to CMDB and Add Relationships, select the target class (for example Cloud DataBase). Find the target CMDB attribute and drag the staged column onto it, or type the mapping in. To populate tags, map the tag key and value columns to Key Value [cmdb_key_value] as a related entry.
6. If you need a new relationship, choose Add Relationship and pick the parent class, child class, and relationship type (for example *Hosted on::Hosts*).
7. Click Mark as Complete for each step, then use Preview and Run (Test Integration) with sample records. Check the IRE preview output for errors.
8. Point the SG-AWS scheduled import at the custom transform map, then deactivate the original so it does not run twice. Under System Import Sets > Scheduled Data Imports, open the job (for example SG-AWS-RDS) and update its transform or robust transform reference.
9. Run the scheduled import once by hand (Execute Now). Then open a sample CI and confirm the new value appears. Capture all changes in an update set.
3.3 Step-by-step: create custom CMDB classes and attributes
Create a new class when an AWS resource type has no suitable CMDB class, for example AWS IAM Role or AWS SQS Queue. Add an attribute when an existing class is missing a field you need. Classes are created in CI Class Manager. Required role:
admin or cmdb_ci_admin (governance approval is usually needed as well).A. Add a custom attribute to an existing class
1. Go to All > Configuration > CI Class Manager. Click Hierarchy and select the class, for example Cloud DataBase.
2. Open Class Info > Attributes, then click Added (to show only custom attributes) and New.
3. Enter the Column label (for example *Backup Retention Days*). The Column name is generated with a
u_ prefix. Choose the Type (String, Integer, Reference, and so on) and the Max length. Click Submit.4. Go back to your custom ETL transform map (Section 3.2) and map the staged column to the new attribute.
B. Create a new CI class
1. In CI Class Manager > Hierarchy, find the parent class. Choose a parent whose inherited attributes make sense. For logical cloud objects use Cloud Resource (
cmdb_ci_cmp_resource ) or the base Configuration Item ( cmdb_ci ). Do not use hardware classes such as Computer.2. Right-click (or use the menu) on the parent and choose Extend, or select the parent and click Add Child Class.
3. Under Basic Info, enter the Label (for example *AWS IAM Role*) and the Table name (for example
u_cmdb_ci_aws_iam_role , or cmdb_ci_aws_iam_role in a scoped app). Optionally set an icon. Click Next.4. Under Attributes, add the class-specific columns, for example
arn , account_id , object_id , create_date , path .5. Under Identification Rule, create an independent rule. Add an identifier entry based on a unique key, typically the resource ARN or the
object_id . See Section 4.6. Optionally set Reconciliation rules (which data source may update which attributes), Dependent relationships, and Suggested relationships (for example *Hosted on: Cloud Service Account*).
7. Click Done. The class and its table are created and appear in the hierarchy.
8. In IntegrationHub ETL, edit your custom transform map. Add the new class under Map to CMDB and map the staged fields to its attributes.
4. The Role of RTE and IRE
Every SGC import, and most other integrations, goes through the same two engines before anything is written to the CMDB.
4.1 Robust Transform Engine (RTE)
The data source writes raw rows to a staging (import set) table. The RTE reads each row and applies the ETL transform map. Defined in IntegrationHub ETL, the map uses entity definitions, field mappings, and transforms such as JSON extraction, concatenation, and scripts. The result is a structured IRE payload: a list of CIs (with class and attributes) and the relationships between them. The RTE never writes to the CMDB itself. It only prepares the payload.
4.2 Identification and Reconciliation Engine (IRE)
The IRE receives the payload and does three jobs:
• Identification: for each incoming CI, it uses the class’s *identification rule* (identifier entries, in priority order) to look for an existing CI. For AWS CIs the strongest identifier is usually the object ID / resource ID / ARN, combined with the account and Region. If it finds a match, the CI is updated. If not, a new CI is created.
• Reconciliation: when more than one source populates the same CI (for example SGC and MID Server Discovery), *reconciliation rules* and data source precedence decide which source is authoritative for each attribute. This stops sources from overwriting each other’s values back and forth.
• Integrity: dependent CIs (for example a NIC that depends on a VM) are identified within their parent’s context. Duplicates are flagged in De-duplication tasks, and every write is recorded with its discovery source (for example *ServiceGraph-AWS*).
| Why this matters
Most “duplicate CI” or “miscategorized asset” problems are fixed by adjusting identification and reconciliation rules, not by deleting records. IRE is also what makes it safe to run SGC and a MID Server in parallel (Part 4, Section 2.1). |
|---|
4.3 Step-by-step: adjust an identification rule
1. Go to CI Class Manager, select the class (for example Virtual Machine Instance), and open Identification Rule.
2. Review the existing Identifier Entries and their priority. Note which attributes are used, for example
object_id .3. To add a new entry, click Add. Select the attribute(s), set the Priority (lower numbers are evaluated first), and choose whether to allow null values. Save.
4. If you also need to match a related table (for example serial number), enable Use related table and choose the lookup table.
5. Test with Configuration > Identification/Reconciliation > IRE Simulation (or CI Identification test) using a sample payload before you run imports.
4.4 Step-by-step: set data source precedence (reconciliation)
1. In CI Class Manager, select the class and open Reconciliation Rules.
2. Click Add. Choose the Discovery Source, for example *ServiceGraph-AWS* or *ServiceNow* (MID Server Discovery). Set its Priority (lower numbers are more authoritative).
3. Optionally restrict the rule to specific attributes. For example, MID Discovery could be authoritative for OS version and SGC for cloud attributes such as instance type and state.
4. Optionally configure Data Refresh Rules, so a lower-priority source may update an attribute if the authoritative source has not refreshed it within a set number of days.
5. Save, then confirm the behavior with one manual import run from each source.
Appendix: References
Topic | Link |
|---|---|
SG-AWS overview (docs) | servicenow.com/docs/r/servicenow-platform/service-graph-connectors/cmdb-integration-aws-sg.html |
Getting started with Service Graph Connectors | servicenow.com/docs/r/servicenow-platform/configuration-management-database-cmdb/cmdb-sgc-intro.html |
Default CMDB data mapping for AWS | servicenow.com/docs/r/servicenow-platform/service-graph-connectors/cmdb-data-mapping-aws.html |
SG-AWS on the ServiceNow Store | store.servicenow.com/store/app/048a27661b246a50a85b16db234bcb06 |
SG-AWS scheduled import jobs (community) | servicenow.com/community/cmdb-articles/aws-service-graph-connector-scheduled-import-jobs/ta-p/2985102 |
SG-AWS deep discovery (KB2210328) | support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2210328 |
SG-AWS FAQ (KB2247863) | support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2247863 |
Generic resource types (KB2914987) | support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2914987 |
CloudFormation templates and cross-account setup (KB2184482) | support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2184482 |
IntegrationHub ETL | servicenow.com/docs/r/servicenow-platform/integration-hub-etl/integrationhub-etl.html |
IRE | servicenow.com/docs/r/servicenow-platform/configuration-management-database-cmdb/ire.html |
AWS Config supported resource types | docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html |
Series: ServiceNow on AWS (9 articles)
- 1Populating the ServiceNow CMDB with AWS Resources This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article