
Pulling AWS IAM Resources (with Tags) into the ServiceNow CMDB
Part 3 of 6: Extending the Service Graph Connector for IAM
Series: ServiceNow on AWS (9 articles)
- …
- 3Pulling AWS IAM Resources (with Tags) into the ServiceNow CMDB This article
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. This is one part of a six-part series; read Part 1 first, as it explains the Service Graph Connector, the CMDB data model, and the RTE and IRE engines referred to here.
The series
Part 1: Core Guide — Service Graph Connector, Data Model and IRE
Part 2: CSDM, Tag-Based Mapping and Ticket Routing
Part 3: Extending the Service Graph Connector for IAM (this document)
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. Pulling IAM resources (with tags) into the CMDB
Appendix: References
Contents
1. Pulling IAM Resources (with Tags) into the CMDB by Extending SGC
By default SGC does not import IAM users, groups, roles, or policies, even though AWS Config can record them. The Tagging API cannot return IAM user or role tags. For audit purposes such as ownership attribution of IAM principals, choose one of the approaches below. A companion guide, *Getting AWS IAM Resources into the ServiceNow CMDB via IntegrationHub ETL*, covers Approach 3 end to end.
1.1 Prerequisite (all approaches): record IAM in AWS Config
The default customer-managed Config recorder excludes the global IAM types
AWS::IAM::User , Group , Role , and Policy . Because IAM is global, record it in one home Region only, to avoid duplicates.1. In the AWS console, open AWS Config > Settings in your chosen home Region (for example us-east-1). Use the delegated admin or management account if you have an Organization-wide recorder.
2. Under the recording strategy, make sure all supported types are recorded and the IAM types are not excluded. In older consoles, select Include global resources.
3. In every other Region, leave the global / IAM types excluded.
4. Verify: in Resources, filter on resource type *IAM Role*, or run an advanced query such as
SELECT resourceId, tags WHERE resourceType = 'AWS::IAM::Role' . Confirm that tags are returned.1.2 Choosing an approach
| Approach 1: Generic Resources allow-list | Approach 2: Clone and extend the SG-AWS ETL | Approach 3: Parallel IH-ETL feed |
|---|---|---|---|
Effort | Low | Medium–high | Medium–high |
Where IAM lands | Generic Cloud Resource ( cmdb_ci_cmp_resource ) | Dedicated custom IAM classes | Dedicated custom IAM classes |
Relationships (Role→Policy, User→Group) | No | Yes | Yes |
Tags | Generic tag handling, IAM User excluded. Validate this. | Map tags → cmdb_key_value yourself | Map tags → cmdb_key_value yourself |
Upgrade safety | Native | Must maintain a clone | Fully separate |
1.3 Step-by-step: Approach 1 — Generic Resources allow-list
1. Role required:
cmdb_inst_admin . In the navigator, type sn_cmdb_int_util_service_graph_resource_inclusion_whitelist.list and press Enter.2. Click New. Set Resource type =
AWS::IAM::Role , Vendor = AWS, and Category = Generic. Submit. Repeat for AWS::IAM::User , AWS::IAM::Group , and AWS::IAM::Policy .3. Go to System Import Sets > Scheduled Data Imports, open SG-AWS-Generic-Resources, make sure it is active, and click Execute Now to run a full load.
4. Check: open Cloud Resource (
cmdb_ci_cmp_resource ) CIs filtered on the IAM resource types. Then open the Key Values related list to see whether tags arrived. IAM User tags are expected to be missing.5. If the tags or attributes you need are missing, move to Approach 2 or 3. (See KB2914987 for configuring the generic resource types.)
1.4 Step-by-step: Approach 2 — clone and extend the SG-AWS ETL
1. Create the custom classes (for example AWS IAM User, Role, Group, Policy) under
cmdb_ci or Cloud Resource in CI Class Manager. Add attributes such as arn , object_id , account_id , path , create_date , assume_role_policy , and policy_document . Follow Part 1, Section 3.3.2. Create independent identification rules keyed on the ARN (Part 1, Section 4.3). This makes re-imports update existing CIs instead of creating duplicates.
3. In IntegrationHub ETL, duplicate the SG-AWS-Generic-Resources transform map (the IAM items in the Config payload pass through it once allow-listed), or the transform map whose data source you will reuse. Name the copy, for example, *SG-AWS-IAM – Custom*.
4. In Prepare Source Data, filter to
resourceType starting with AWS::IAM:: . Extract the fields from the configuration JSON (for example arn , roleId / userId , path , createDate , attachedManagedPolicies , groupList ) and the tags array.5. In Map to CMDB, map each resource type to its custom class. Map the tags (key/value) to Key Value [`cmdb_key_value`]. Add relationships: User *Member of* Group; Policy *Used by* User/Role/Group; every IAM CI *Hosted on* or *Contained by* its Cloud Service Account.
6. Test with Preview and Run, then point the scheduled import at the clone and run it. Check that the IAM CIs, their tags, and their relationships are correct.
7. Record the changes in an update set or scoped app, and re-test after every SG-AWS upgrade.
1.5 Approach 3 and other options
• Parallel IH-ETL feed (Approach 3): a separate scripted data source pulls
AWS::IAM::* from Config (or from the IAM APIs ListRoles , ListRoleTags , ListUserTags , and so on) into its own staging table and transform map. It has its own discovery source, and IRE reconciles it on the ARN. It is fully decoupled from SG-AWS upgrades. The companion guide covers it in full.• IntegrationHub AWS IAM Spoke: reads the IAM API directly. It does not include tags by default, but you can add custom actions (
ListUserTags , ListRoleTags ).• MID Server Cloud Discovery: pattern-based discovery can import IAM data including tags, in parallel with SGC (Part 4, Section 2.1).
• Note: AWS IAM groups cannot be tagged. Users, roles, and customer-managed policies can.
Governance reminder
Extending the CMDB schema with IAM classes usually needs approval from your CMDB governance owner. IAM data is security-sensitive. Restrict read access to the new classes with ACLs where appropriate, and do not import policy documents if they are not needed. |
|---|
Appendix: References
Topic | Link |
|---|---|
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 |
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 IAM Spoke | servicenow.com/docs/r/integrate-applications/integration-hub/aws-iam-spoke.html |
AWS Config RecordingGroup (IAM exclusion) | docs.aws.amazon.com/config/latest/APIReference/API_RecordingGroup.html |
Series: ServiceNow on AWS (9 articles)
- …
- 3Pulling AWS IAM Resources (with Tags) into the ServiceNow CMDB 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