Murali Reddy1
ServiceNow Employee
ServiceNow Employee

The Service Graph Connector for AWS (SG-AWS) is part of the Service Graph integration projects. The connector is built to simplify the onboarding setup and ease the integration across multiple AWS accounts in an organization. This application uses one ServiceNow user account to pull in data from all of the accounts in an AWS Organization. This article describes the concepts and setup of the Service Graph Connector for AWS. 

Objectives of SG-AWS

  • Simplify on-boarding experience
  • Minimal credentials requirement
  • No MID server required 
  • Coverage for multiple AWS accounts across the organization
  • Future proofing new account or region addition
  • Near-real time Discovery of changes

AWS Organization Structure

find_real_file.png

The figure above shows the AWS Organization management & member account setup. The individual accounts are grouped in an Organization Unit which we can correlate to a business unit or department in an organization. Within each unit, it can have multiple accounts to represent different environments such as development, test, UAT, or performance. 

Service Graph Connector for AWS uses two AWS components to get hardware and software information. 

  1. AWS Config 
    • Gets All hardware CI information into CMDB
  2. AWS Systems Manager (SSM)
    • When SSM enabled, it will get all software installed information into CMDB.
    • When SSM enabled and deep discovery setup done, it will bring Serial Number, low-level OS details, TCP and Running process information in to CMDB.

However, to get the Account ID, Regions, EC2 Instance Types & Image Types (AMI), we need to invoke individual APIs to get the details. For more details on the specific roles, refer to FAQ.

 

AWS Config

AWS Config is AWS' Configuration Management Database (CMDB) service, which enables you to assess, audit, and evaluate the configurations of your AWS resources. AWS Config continuously monitors and records your AWS resource configurations, allowing you to automate the evaluation of recorded configurations against desired configurations. Using Config, you can review changes in configurations and relationships between AWS resources, dive into detailed resource configuration histories, and determine your overall compliance with the configurations specified in your internal guidelines. This simplifies compliance auditing, security analysis, change management, and operational troubleshooting.

AWS Config records resource information at a regional level, which can be aggregated at an account or organization level. For our use cases, we will aggregate at a regional level and make the appropriate API calls.

 

AWS Config Recorder

 

The AWS Config recorder collects Configuration Item (CI) information from various resources in a region and updates its database in near real-time. By default, this feature is not set up in AWS, so the AWS administrator must set up the recorder in each account. As part of the guided setup, we will use the CloudFormationScript - EnableAWSConfig.yml, which will enable the AWS Config Recorder. This script can be executed in all or selected accounts and regions, with detailed setup instructions provided in the guided setup.

 

Once the script is executed in an account and region, the AWS Config dashboard will appear as follows.

screenshot.

find_real_file.png

 

AWS Config Aggregator

An aggregator is an AWS Config resource type that collects AWS Config configuration and compliance data from the following:

  • Multiple accounts and multiple regions.
  • Single account and multiple regions.
  • An organization in AWS Organizations and all the accounts in that organization which have AWS Config enabled.

Advantages of using Central Aggregator:

  • With the central aggregator, Service Graph Connector for AWS gets all the data from one location. 
  • It doesn't require looping into each account and region. 
  • This setup will significantly improve the performance and speeds up pulling data.
  • Central aggregator is used to get the bootstrap (baseline) and incremental update (any new config added after last update).
  • However, for detecting the deleted resources, Service Graph Connector for AWS needs to loop through each account and region to update the CMDB CI accordingly. We need config:List* (specifically config:ListDiscoveredResources)  IAM access in each account. 

config:ListDiscoveredResources API & Performance Impact:

  • When a resource is deleted from an AWS environment, it must be recorded in the Configuration Management Database (CMDB) and marked as retired or absent. The only API that currently offers details about removed resources is config:ListDiscoveredResources. However, since this API is only accessible at the account and region levels, SGC-AWS must loop through every account and region to collect this deleted data.

  • The default retention duration for AWS Config is seven years, and there is no date range available in the config:ListDiscoveredResources API to select a subset of data. The API will paginate to extract all the data from AWS Config, and when resources are repeatedly built and deleted, AWS Config accumulates deleted data.

  • Due to the inability to specify a date range, the config:ListDiscoveredResources API makes several thousand API calls to gather all the data, which has a significant impact on performance.

  • We have submitted a feature request to the AWS Config team asking them to include information about removed resources in the aggregator API for AWS Config Central, where we can specify a date range and retrieve the specific subset of data we need. We have addressed this issue as part of the SGC-AWS 2.0 release by limiting the number of API calls.

Setup Instructions:

This is an optional setup. If the aggregator is set up at a central location, it will import the data faster. 

find_real_file.png

 

AWS Systems Manager (formerly SSM - Simple Systems Manager)

The AWS Systems Manager is the operations hub for AWS. Systems Manager provides a unified user interface so you can track and resolve operational issues across your AWS applications and resources from a central place. As part of the Service Graph connector integration, we are going to use one specific feature - Inventory. 

 

AWS Systems Manager Inventory

The AWS Systems Manager collects information about your instances and the software installed on them, helping you to understand your system configurations and installed applications. You can collect data about the applications, files, network configurations, Windows services, registries, server roles, updates, and any other system properties. The gathered data enables you to manage application assets, track licenses, monitor file integrity, discover applications not installed by a traditional installer, and more.

AWS Systems Manager Inventory and Service Graph connector for AWS Integration

  • By default, AWS Systems Manager doesn’t have permission to perform actions on your instances. So, you will need to grant access by attaching an AWS IAM instance profile role (AmazonSSMForInstancesRole) to an EC2 instance.
  • As part of the Service Graph connector for AWS, it imports the software installed in the instances and populates the CI information.
  • Refer to the Systems Manager prerequisites for a successful setup.
  • The following components should be available in all of the accounts for the Systems Manager integration to be successful:
    • Systems Manager Agent (SSM Agent) installed in EC2 instances.
    • AmazonSSMManagedInstanceCore policy attached as instance profile in EC2 instances.
    • Systems Manager Inventory setup configured in each region.

AWS Systems Manager Inventory Setup

AWS Systems Manager is not available by default. We need to enable it to use this feature and it's available for free. The setup is a two-step process:

1. Setup AmazonSSMRoleForInstances instance profile in EC2 instances

For us to get the software installed details, we need to provide permissions for communication between the instances and the Systems Manager API. You need to create a policy and attach the 'AmazonSSMManagedInstanceCore' role. This role needs to be assigned to the EC2 instance. 

The AWS documentation provides details steps to create an instance profile and how to attach it to an EC2 instance. As part of this integration, we need to create the Policy: AmazonSSMManagedInstanceCore. Based on your environment, create the appropriate policies and attach it to the EC2 instances. We can ignore the steps described for S3 buckets as we are not using this feature. 

find_real_file.png 

The figure below shows the 'AmazonSSMRoleForInstances' attached to the EC2 instance.

 find_real_file.png

 

2. Setup AWS Systems Manager Inventory

AWS provides an automation script which is available as part of the AWS Systems Manager Automation which will setup the AWS Systems Manager inventory in an account. You can navigate to AWS Systems Manager > Automation > Execute then search for 'inventory; in the automation document as shown below.

 

find_real_file.png

From this page, you need to navigate inside the 'AWS-SetupInventory', click on "Execute Automation". Once you are in this page, you can execute the document and it will setup SSM inventory in the account region.

find_real_file.png

 

Multi-Account Multi-Region SSM Inventory setup:

If you have multiple accounts and regions, it may take time to repeat the steps in all the accounts and regions. To set up a multi-account multi-region SSM Inventory, the admin needs additional privileges such as AWS-SystemsManager-AutomationExecutionRole and AWS-SystemsManager-AutomationAdministrationRole. Please refer to the guided setup for instructions on how to set up the IAM privileges correctly. Please note that these roles are assigned to your company's AWS Admin and not the ServiceNow user.

 

After setting up the IAM privileges, please refer to the AWS documentation under the section "Run an automation in multiple Regions and accounts (console)". Once you have the setup, select the "Multi-account and region" option, enter the OUs/Account IDs, select regions, and execute the automation script.

find_real_file.png

Inventory Dashboard:

find_real_file.png

Note: To view the Inventory dashboard, we need to have the EC2 instance(s) created in the region or else it will show up on the 'Setup Inventory' page.

 

The figure below screenshot displays the Inventory list for an EC2 instance.

find_real_file.png

 

AWS Systems Manager for getting EC2 System Information (aka. Deep Discovery):

Currently, there is no AWS API available to provide hardware deep discovery details such as serial number, RAM, hard disk, TCP connections, and process information. However, we can obtain this information by executing OS-specific commands. AWS Systems Manager (SSM) provides the SendCommand API, which allows us to execute the OS-specific commands. The terminal output is collected in an S3 bucket, and SGC-AWS parses the output and populates the CMDB CI. At a high level, the flow to execute commands and get the data into the CMDB is as follows:

  1. SG-AWS makes the SSM SendCommand API call to execute a custom SSM document defined by SG-AWS.
  2. SSM executes a custom SSM document script in an EC2 instance.
  3. EC2 executes the command and publishes the output into the common/centralized S3 bucket.
  4. SG-AWS then invokes files generated in S3 bucket and parse the command output and populates the relevant CMDB data. SG-AWS then deletes the files in S3 and completes the process.

find_real_file.png

Security Risk and Mitigation:

1. Malicious Command Execution:

The SendCommand API executes SSM document scripts, which take inputs from the API request body. There are pre-existing documents available for Windows (AWS-RunPowerShellScript) and Linux (AWS-RunShellScript), which take commands as inputs and execute them in an EC2 instance. However, these documents can pose serious security risks, such as shutting down an instance or killing a process. To mitigate these risks, we have created a custom SSM document that does not take any input parameters and executes predefined commands, as discussed in later sections.

 

2. S3 Bucket Access:

The output of the terminal is large, and the API response truncates it halfway. Hence, we collect the output in an S3 bucket to make the setup easier. We request you to create one S3 bucket for this feature, where the ServiceNow user will have the privileges to read and delete files once the process is completed. It is recommended to create an S3 bucket specifically for the SG-AWS application and allow the ServiceNow user to have access to this bucket in the organization.

 

To enhance security in the AWS environment, the ServiceNow user will need access to the following SSM documents (SG-AWS-RunShellScript, SG-AWS-RunPowerShellScript) and specific S3 bucket. The IAM policies defined later in the sections will describe the policy to be set.

Setup Instructions:

  1. Create S3 bucket.
  2. Target S3 bucket policy.
  3. Attach IAM permissions to EC2 instance to publish command output to S3 bucket.
  4. Setup SSM Documents - Windows (AWS-RunPowerShellScript) & Linux (AWS-RunShellScript).
  5. Add additional SSM, S3 IAM permissions to the ServiceNow user.

1.Create S3 bucket

Create S3 bucket in the account region you want with the permissions listed below:

Permissions overview
Access Bucket and objects not public
Block public access (bucket settings) Block all public access
Bucket policy See next section


2. Target S3 bucket policy

The target S3 bucket must allow the instance profile role, which is attached to the managed EC2 instance, to access the bucket. You can either create a bucket policy or grant access to the source AWS account in the bucket access control list (ACL).

 

Warning: Creating a bucket policy is a security best practice. Adding the source AWS account to the bucket ACL allows all users and roles in the source AWS account to access the S3 bucket.

 

The following is an example of a bucket policy for the target S3 bucket. The bucket policy needs to be repeated for each account, as described in the example:

  • Replace DOC-EXAMPLE-BUCKET with the S3 bucket name in the target account. Make sure, you have '/*' after the bucket name.
  • Replace SOURCE-AWS-ACCOUNT with the source AWS account ID.
  • Replace INSTANCE-PROFILE-ROLE-NAME with the IAM instance profile that is attached to the EC2 instance.

Template:

 

 

{
    "Version": "2012-10-17",
    "Id": "Policy1589684413780",
    "Statement": [
        {
            "Sid": "Stmt1589684412557",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::SOURCE-AWS-ACCOUNT:role/INSTANCE-PROFILE-ROLE-NAME"
            },
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET/*"
        }
    ]
}

 

 

Example:

 

{
    "Version": "2012-10-17",
    "Id": "Policy123456789000",
    "Statement": [
        {
            "Sid": "EC2S3Access",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "arn:aws:iam::123456789000:role/AmazonSSMRoleForInstances",
                    "arn:aws:iam::123456789001:role/AmazonSSMRoleForInstances",
                    "arn:aws:iam::123456789002:role/AmazonSSMRoleForInstances",
                    "arn:aws:iam::123456789003:role/AmazonSSMRoleForInstances",
                    "arn:aws:iam::123456789004:role/AmazonSSMRoleForInstances"
                ]
            },
            "Action": [
                "s3:GetObject",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "arn:aws:s3:::myS3Bucket/*"
        }
    ]
}

 

 

 

Reference: https://aws.amazon.com/premiumsupport/knowledge-center/ssm-output-s3-other-account/ 

 

3. Attach IAM permissions to instance profile for EC2 instance to publish command output to S3 bucket

In the AWS Systems Manager setup, we created the 'AmazonSSMForInstancesRole' role and attached it to each EC2 instance to get software information. You need to attach the below policy to the existing instance profile. The AmazonSSMForInstancesRoleSetup.yml script has the update. 

The IAM instance profile role attached to your managed Amazon Elastic Compute Cloud (Amazon EC2) instance must have the following actions in place to allow access to the S3 bucket. Replace DOC-EXAMPLE-BUCKET with the S3 bucket name in the target account.

 

For the AWS Systems Manager setup, we created the 'AmazonSSMForInstancesRole' role and attached it to each EC2 instance to retrieve software information. You need to attach the policy below to the existing instance profile. The AmazonSSMForInstancesRoleSetup.yml script has the update.

 

The IAM instance profile role attached to your managed Amazon Elastic Compute Cloud (Amazon EC2) instance must have the following actions in place to grant access to the S3 bucket. Replace DOC-EXAMPLE-BUCKET with the actual S3 bucket name in the target account.

 

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublishTerminalOutputToS3",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET/*"
        }
    ]
}

 

 

4. Setup SSM Documents:

The SG-AWS application will use the SendCommand API to invoke the SG-AWS-RunShellScript and SG-AWS-RunPowerShellScript scripts for Linux-based and Windows-based instances, respectively. SSM Documents were introduced in version 1.4.2, and we will continue to add more features over time. Depending on the version you download, you will receive appropriate attributes in the system.

 

Using SSM SendCommand, you can obtain the following OS-level details:

# Attribute Available from SG AWS Version CMDB CI
1 Serial Number 1.4.2 cmdb_ci_server.serial_number
2 Running Process 1.4.2 cmdb_running_process
3 TCP 1.4.2 cmdb_tcp
4 CPU Model 1.5 cmdb_ci_server.model_id
6 Disk Space 1.5 cmdb_ci_server.disk_space
7 Manufacturer 1.5 cmdb_ci_server.manufacturer
8 CPU Speed 1.5 cmdb_ci_server.cpu_speed
9 RAM  1.5 cmdb_ci_server.ram
10 CPU Manufacturer 1.5 cmdb_ci_server.cpu_manufacturer
11 CPU Type 1.5 cmdb_ci_server.cpu_type
12 CPU core count 1.5 cmdb_ci_server.cpu_core_count 

Also the SSM SendCommand brings the TCP, Running Process

TCP (cmdb_tcp)

# Attribute
1 Type
2 IP
3 Port
4 PID
6 Process

Running Process (cmdb_running_process)

# Attribute
1 PID
2 Name
3 Command
4 Parameters
6 PPID
7 Parent

 

This article provides detailed information about the various versions of SSM documents used in this application.

Note:

This setup is optional. If you need to import serial numbers, TCP connections, and process information in an EC2 instance, then this setup is required. This setup depends on SSM enablement, and you need to follow the steps described in the 'AWS Systems Manager Setup' section.

 

5. SSM, S3 IAM permissions to the ServiceNow user:

The IAM authorization required for a ServiceNow user to execute SSM documents in an AWS environment is listed below. The ServiceNow user will only be able to run SG-AWS-RunShellScript and SG-AWS-RunPowerShellScript SSM documents in the EC2 instances with this permission. Access to additional SSM documents is denied by default.

 

 

{
 "Action": [
     "ssm:SendCommand"
  ],
 "Resource": [
    "arn:aws:ec2:*:*:instance/*",
    "arn:aws:ssm:*:*:document/SG-AWS-RunShellScript",
    "arn:aws:ssm:*:*:document/SG-AWS-RunPowerShellScript"
 ],
 "Effect": "Allow",
 "Sid": "SendCommandAccess"
}

 

The output from the TCP/Running process terminal is published in an S3 bucket. This bucket must be accessed by a ServiceNow user in order to read and populate CIs. When the process is finished, we delete the file from the S3 bucket because it is no longer referenced. We require read and delete access to the S3 bucket in order to complete these processes. As a result, we are asking you to create a separate S3 bucket to which only the ServiceNow user will have access.

 

{
 "Action": [
    "s3:GetObject",
    "s3:GetBucketLocation",
    "s3:ListBucket",
    "s3:DeleteObject"
 ],
 "Resource": 
   "arn:aws:s3:::myBucket/*"
 ],
 "Effect": "Allow",
 "Sid": "S3BucketAccess"
}

 

These IAM positions have been consolidated into a single role, which is covered in the next section.

Legal Disclaimer: S3 Bucket costs

The feature uses an S3 bucket to collect the terminal output in a central location. SSM SendCommand captures the output in the S3 bucket, and the SG-AWS application reads and deletes the file immediately. There is a cost associated with the files created in the S3 bucket. Depending on the number of EC2 instances running in the organization and the size of the terminal output, the monthly cost will vary. For more information on pricing, please visit the AWS S3 Pricing page.

 

AWS Identity and Access Management (IAM)

The AWS IAM provides fine-grained access control to each component. We need two sets of permissions for integrating the Service Graph connector and AWS:

  • Admin user: The admin user performs the setup of various components in AWS and may require additional privileges apart from the standard Administration Access role.
  • ServiceNow user: The ServiceNow user will have limited privileges to invoke AWS API and import CI information into the CMDB.

Admin User:

An admin user who has the AdministratorAccess policy assigned has privileges to execute the CloudFormation scripts to set up the AWS Config. Additionally, to set up the AWS Systems Manager Inventory from a management account, the admin needs the AWS-SystemsManager-AutomationAdministrationRole and AWS-SystemsManager-AutomationExecutionRole roles.

 

ServiceNow User IAM Privileges:

To import CI information from a client's AWS account, a ServiceNow user needs to be created in the management account. User credentials (Access Key and Secret key) are entered in the ServiceNow instance to integrate with AWS accounts. We will execute CloudFormation templates in member and management accounts for us to integrate with all the accounts.

 

The OrganizationAccountAccessRole IAM role is created when an account is created from an organization. This is an admin role that helps a user with a management account to hop into a member account and perform administrative operations. However, if the account is created externally and was later added to the organization, the OrganizationAccountAccessRole is not created by default.

If the organization is okay using the OrganizationAccountAccessRole, and the role is present in all accounts, then skip executing CreateSnowOrganizationAccountAccessRoleInMemberAccount.yml.

Alternatively, if an organization is concerned about security or the OrganizationAccountAccessRole is not present in all accounts, then you can execute the CF Template:

CreateSnowOrganizationAccountAccessRoleInMemberAccount.yml. This template has limited read-only access. It creates the following IAM role: SnowOrganizationAccountAccessRole, and SnowOrganizationAccountAccessPolicy policy.

 

In a typical setup, member accounts are either created from the organization or an account created externally later added to the organization. The OrganizationAccountAccessRole IAM role is created when an account is created from an organization. This is an admin role that helps users with a management account to hop into a member account and perform administrative operations. However, if the account is created externally and was later added to the organization, the OrganizationAccountAccessRole is not created by default. In this case, we will be using the SnowOrganizationAccountAccessRole, which will have limited read-only access. You can also have your own role name as per enterprise standards. This role name is required while setting up guided setup for SG-AWS.

 

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "organizations:DescribeOrganization",
                "organizations:ListAccounts",
                "organizations:ListRoots",
                "organizations:ListAccountsForParent",
                "organizations:ListOrganizationalUnitsForParent",
                "organizations:DescribeOrganizationalUnit",
                "organizations:ListTagsForResource"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "ReadOnly_Access_In_Org_Account"
        },
        {
            "Action": [
                "config:ListDiscoveredResources",
                "config:SelectResourceConfig",
                "config:BatchGetResourceConfig"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "ReadOnlyAccess_For_Config_In_Each_Account"
        },
        {
            "Action": [
                "config:DescribeConfigurationAggregators",
                "config:SelectAggregateResourceConfig",
                "config:BatchGetAggregateResourceConfig"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "ReadOnly_Access_For_Config_In_Account_Config_Aggregator_is_defined"
        },
        {
            "Action": [
                "ec2:DescribeRegions",
                "ec2:DescribeImages",
                "ec2:DescribeInstances",
                "ec2:DescribeInstanceTypes"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "Read_Only_Access_In_Account_Where_ServiceNow_User_Is_Created"
        },
        {
            "Action": [
                "tag:GetResources"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "ServiceNowUserReadOnlyAccessTag"
        },
        {
            "Action": [
                "iam:CreateAccessKey",
                "iam:DeleteAccessKey"
            ],
            "Resource": [
                "arn:aws:iam::<ACCOUNT_ID>:user/<SERVICENOW_USER_NAME>"
            ],
            "Effect": "Allow",
            "Sid": "ReadWriteAccessToRotateIAMAccessKeys_Optional_Setup"
        },
        {
            "Action": [
                "ssm:SendCommand"
            ],
            "Resource": [
                "arn:aws:ec2:*:<ACCOUNT_ID>:instance/*",
                "arn:aws:ssm:*:<ACCOUNT_ID>:document/SG-AWS*"
            ],
            "Effect": "Allow",
            "Sid": "SSM_SendCommand_Access_To_Get_Deep_Discovery_Details_Optional_setup"
        },
        {
            "Action": [
                "s3:GetObject",
                "s3:GetBucketLocation",
                "s3:ListBucket",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::<BUCKET_NAME>/*",
                "arn:aws:s3:::<BUCKET_NAME>"
            ],
            "Effect": "Allow",
            "Sid": "ServiceNow_S3_Bucket_Access_Needed_In_Account_Where_S3_Bucket_Is_Defined"
        }
    ]
}

 

 

 If you want to customize the roles, you can refer to the FAQ article.

Some companies place organization level  AWS service control policies to restrict member accounts to make specific API calls. You need to talk to your corporate security operations team to whitelist (Allow) the member accounts.Below is an example:

MuraliReddy1_0-1670181072924.png

 

ServiceNow User Creation

The ServiceNow user is created in either a management (organization) account or designated member account with limited privileges. The CFT scripts, which are part of this section, need to be executed based on the use case scenario. CreateServiceNowUser.yml is executed with any of the options you choose.

 

ServiceNow user created in a Management (Organization) Account

  • The ServiceNow user will pull the organization details, list of accounts, and list of regions in the management account.
  • A trust is established between the management account and all member accounts using the CreateSnowOrganizationAccountAccessRoleInMemberAccount.yml script.
  • With this trust, the ServiceNow user will be able to assume the role to get CI information from all member accounts.

find_real_file.png

In the figure above, the ServiceNow user is created in a management account. The ServiceNow user will hop into all member accounts with STS Assume role access and pull in CI information. 

ServiceNow user created in Designated Member Account

  • Some organizations prefer to create users in a designated account for security reasons.
  • To enable the ServiceNow user to pull the organization details, list of accounts, and list of regions in the management account, we need to establish trust between the designated member account and the management account.
  • Similarly, a trust is established between a designated member account and all other member accounts to enable the ServiceNow user to get CI information from all member accounts using the CreateSnowOrganizationAccountAccessRoleInMemberAccount.yml script.
  • To establish trust between a designated member account and management account, you need to execute SnowDesignatedAccountAccessRoleInManagementAccount.yml in the management account and then add the designated member account ID into the script.

find_real_file.png

In the above figure, the ServiceNow user is created in a designated (non-management) account and can access management and other member accounts through STS Assume role to retrieve CI information.

 

ServiceNow User's SnowAccountAccessPolicy:

The following IAM permissions are required for a ServiceNow user where it is created. These roles are packaged as part of CreateServiceNowUser.yml with the policy SnowAccountAccessPolicy. If you need AWS Key rotation feature, then make sure 'iam:CreateAccessKey' and 'iam:DeleteAccessKey' permissions are assigned in the policy.

  • ec2:DescribeImages
  • ec2:DescribeRegions
  • ec2:DescribeInstances
  • ec2:DescribeInstanceTypes
  • organizations:DescribeOrganization
  • organizations:ListAccounts
  • iam:CreateAccessKey*
  • iam:DeleteAccessKey*

* - Optional permissions required if you activate AWS Key rotation

 

SnowAccountAccessPolicy:

 

 {
    "Statement": [
        {
            "Action": [           
                "ec2:DescribeImages",
                "ec2:DescribeRegions",
                "ec2:DescribeInstances",
                "ec2:DescribeInstanceTypes",
                "organizations:DescribeOrganization",
                "organizations:ListAccounts",
                "iam:CreateAccessKey",
                "iam:DeleteAccessKey"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "ServiceNowUserReadOnlyAccess"
        }
    ]
}

 

Performance: 

For optimal performance, AWS APIs have TPS limits to serve all clients, with specific limits for each API. When these limits are exceeded, AWS throws a Throttling Error. In SG-AWS, we will retry and get the response in the next second. However, with hundreds of accounts and thousands of API calls, this can significantly impact performance.

To enhance performance of the integration, we recommend raising a support ticket to increase the TPS limits for the following APIs:

  1. https://config.[aws_region].amazonaws.com - Config Service
  2. https://sts.amazonaws.com - IAM (Identity and Access Management)
  3. https://ssm.[aws_region].amazonaws.com/ - Systems Manager
  4. https://tagging.[aws_region].amazonaws.com - Tags
  5. https://ec2.[aws_region].amazonaws.com - Elastic Cloud Computing
  6. https://dynamodb.[aws_region].amazonaws.com - DynamoDB
  7. https://s3.[aws_region].amazonaws.com - Amazon Simple Storage Service (S3)

 

Related Articles: 

SGC-AWS - Release 2.0 Features

Service Graph Connector for AWS - Functional Spec and CI Details

Service Graph Connector for AWS - Diagnostic Tool

ServiceGraph AWS Connector - Using MID Server

Cloud Discovery and SG-AWS

Service Graph Connector for AWS - FAQ

Service Graph Connector for AWS - SSM Documents

Service Graph Connector for AWS - Amazon EKS Integration (KB1437138)

 

Related KBs:

SGC-AWS Setup Instructions (KB: KB1220597)

 

Presentations:

Beers with Engineers on SGC-AWS

Beers with Engineers on SGC-AWS 2.0

 

Comments
declannolan
Tera Contributor

Thanks Murali...can you (or someone else) advise on the IAM setup for this Service Graph Connector where a customer already has implemented Cloud Discovery (with IAM Assume role approach)?

What I'm not clear is why the Cloud Discovery approach requires a MID server (on an EC2 instance) to do "assume role" into AWS management and member accounts, but the Service Graph Connector appears to authenticate in a different way?

Is there a simplified explanation of how the contrasting approaches to authentication work for Cloud Discovery vs SGC-AWS, and how to configure authentication/roles etc when both Cloud Discovery and SGC are used?

(Of course I'm operating on the assumption that it is advantageous to have BOTH Cloud Discovery and the SGC-AWS configured in an AWS environment...I could be wrong but's this is not clear :-))

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hello Declannolan,

 

This community can answers your above questions. 

 https://community.servicenow.com/community?id=community_article&sys_id=5c4de27b1b6e4550ccc253da234bc...

 

BR,

Murali

Sonu
Tera Guru

Hey murali does this support even discovering the Cloud formation too part of the cloud resources ?

 

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Nope, we don't pull currently

Stacey Perri
Tera Contributor

It doesn't appear that this SG connector brings in DNS records and Aliases.  Am I correct?  We use AWS primarily for Route 53 / Public DNS management. 

Cloud Discovery is setup in our instance, but it is difficult to report for what DNS records have been created in CMDB from AWS vs. DNS records from other Discovery Schedules.  Has anyone else had success with querying for cloud discovery when the "Discovery Schedule" field is blank on non-hardware items (cloud discovery uses all MID servers, so trying to report on created by is also not an option)

I've had a thought to try and use tags via AWS for DNS records.  I'm not familiar enough with AWS to know how difficult that will be, but do have a plan to discuss this as an option with our AWS product owner.  

andrewrouch
Tera Expert

The link to the Amazon EKS integration is either missing or has incorrect permissions to allow it to be viewed.

Carsten Schnor1
Tera Expert

I checked the RTE definitions for AWS-SG but do not find the reference where and how netstat and process information gets integrated into the related tables. We intend to bring netstat and process information in for Machine Learning based Service Mapping. So which process would take care to extract the netstat/process information from the S3 bucket? Is this "out of the box" coming with SG-Graph for AWS or will this require custom modifications?

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

To get TCP (netstat) and process information, few steps are required to be setup in each EC2 instance and also S3 bucket setup. Please refer to AWS Systems Manager for getting EC2 System Information (aka. Deep Discovery) section of this documentation. The SendCommand flow does SSM integration with EC2 and grabs the TCP & Process information from the EC2 instance. 

Carsten Schnor1
Tera Expert

Dear Murali,

 

thx for responding. I'm aware about the pre-requisites and the SSM. My question was about the steps that follow, the process that is processing the data once it got collected via SSM and was sent to the S3Bucket.

 

I'm looking to understand the import process that reads the S3 bucket and processes data for making it available in the TCP and running processes tables (e.g. for ML based Service Mapping).

I was unable to identify any RTE triggered activity that reads the S3 bucket, parses the netstat info and pushes the parsed data into the called out tables.

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi Carsten, 

 

The Import schedule triggers the reading of S3 bucket data and then imports the data in to import set table. There is a built in ADM process which takes the TCP / Process output and inserts in to cmdb tables. There is no IH ETL mapping for this piece of functionality. 

Dharshini Rohit
Tera Contributor

Hi Murali,

 

Thanks for the article, however "SnowDesignatedAccountAccessRoleInManagementAccount.yml" script is missing from the download package. Could you please share the contents of that script? 

We would need this script as we are establishing the trust between Member account and management account and the connector is failing with IAM role issue. Hence require the contents of the yml script.

 

Thanks 

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi @Dharshini Rohit,

We intentionally tried to remove it in last release as many member accounts were able to list accounts. With recent changes in AWS, only designated account will be able to list. Hence we are adding back in upcoming release. Please execute this script in mgmt account and include member account id (where ServiceNow user is created) as part of script parameter. 

 

AWSTemplateFormatVersion: 2010-09-09
Description: >-
  This CF Template creates SnowOrganizationAccountAccessRole in Management account.
  ServiceNow user is created in delegated member account.
  ServiceNow user needs to get details of organization and list of accounts associated to organization.
  Note: This script needs to be executed in Management Account
Metadata:
  'AWS::CloudFormation::Interface':
    ParameterGroups:
      - Label:
          default: Member Account Details
        Parameters:
          - MEMBERACTNBR
    ParameterLabels:
      MEMBERACTNBR:
        default: Enter  Member Account Id where ServiceNow user is created
Parameters:
  MEMBERACTNBR:
    Type: String
    MaxLength: 12
    MinLength: 12
Resources:
  SnowOrganizationAccountAccessRole:
    Type: 'AWS::IAM::Role'
    Properties:
      RoleName: SnowOrganizationAccountAccessRole
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              AWS: !Ref MEMBERACTNBR
            Action:
              - 'sts:AssumeRole'
      Path: /
      Policies:
        - PolicyName: SnowOrganizationAccountAccessPolicy
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Action:
                  - 'organizations:Describe*'
                  - 'organizations:List*'
                  - 'ec2:Describe*'
                Resource: '*'
Outputs:
  ServiceNowUserRoleARN:
    Description: ARN of ServiceNow OrganizationAccountAccessRole Role
    Value: !GetAtt 
      - SnowOrganizationAccountAccessRole
      - Arn

 

 

Boris Halynski
Mega Explorer

Hi, @Murali Reddy1 

 

Where I can download the latest version of the download package with *.yaml files?

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

@Boris Halynski  yaml files are packaged as part of guided setup of this SGC-AWS plugin. 

Pranav Patil
Tera Contributor

Hi Murali, 

What is the difference between Service graph connector and Service Management connector for aws? 

Also is there any documentation on how to run .yaml scripts in aws ?

Thanks 

Kamil Smusz
Kilo Sage

Hi @Murali Reddy1 do you know if ServiceGraph is able to discover ElastiCache?

Carsten Schnor1
Tera Expert

Hi @Murali Reddy1 ,

 

we implement SG-AWS in a large customer environment in a strongly regulated environment. Thus reducing retention policies down from 7 years will be an issue.

 

Are there any news/any feedback from Amazon about accpeting the enhancement request for aggregator to provide "deleted resource" information? If so, are there any timelines available?

 

Right now we are torn between "block account level access, and ignore the lifecycle information, but gain performance" and "loose performance and enable read access into all accounts".

 

So if we are talking about a couple of months, we might recommend "accept missing lifecycle information for a few months but keep performance". If we are talking about "undefined" we will need to go a different way.

 

Any recommendations from your side?

 

Best,

 

Carsten

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi @Carsten Schnor1 , 

 

We have raised a feature request to bring all the deleted resource info to Central Aggregator so that we can avoid hopping to each account region to get deleted resource info. This was raised in May 2021 and we are still awaiting for the solution from AWS Team. 

 

As part of SG-AWS 2.0 release (Release planned for May 2023), we have taken an alternate step to reduce API calls so that you don't need to change the 7 year retention period. We will gather resources which are active (Installed) in CMDB and query AWS and check if they are active  and mark the resource as Retired / Absent. 

 

Hope this helps addressing your issue. If you are interested to test in temporary instance with an updateset, we have it ready and happy to share. Please note the updateset is not intended for any of your dev, qa, or prod environments. Please reachout to @vaibhav bhatnagar for further questions. 

 

Thanks,

Murali

stasy
Tera Contributor

Is there any additional information as to how the Service Graph Connector for AWS determines uninstalled software and handles deletes in cmdb_sam_sw_install?

Carsten Schnor1
Tera Expert

Hi @Murali Reddy1 ,

 

thank you so much for the fast turnaround. This helps me in a criticial customer environment.

Your approach about implementing the streamlined principle is great news.

May I assume that - until AWS will adopt the deleted resources management in the aggregator - we will still need to get access to ListReources on each individual Service Account?

So you will reduce the number of calls, but will not change privilege pre-requisites?

 

Best,

 

Carsten

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi Carsten, 

 

ListDiscoveredResources is the only API that provides deleted information, thus we must still go to the account region level to obtain deleted resource information. By requesting a list of active resources from the CMDB and making a predetermined number of calls, we are able to optimize the ListDiscovered resources API call. That said, ListDiscoveredResources allows only 20 resource ids per ListDiscovered resources API call. I have raised a feature request with AWS, until then we will go with this new approach.

 

Before, we created ListDiscovered resources to provide access to all deleted resources, but we were unaware that some businesses would create and delete resources more frequently (some create resources in the morning and delete them in the evening), which would exponentially increase the amount of deleted information since the API lacks a date range to subselect information.

 

Overall, I am expecting better performant than previous approach and unblock many customers like yours. Hope this helps.

 

Thanks,

Murali

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi Stasy, 

We have Software Inventory flow which collects the software installed. Also we have another flow, Software Remove flow which will identify the deleted software and remove them from CMDB. 

Here is how it works:

  1. On Day 1, lets say you have 10 software installed in a server. We import this info as part of Software Inventory flow and insert into CMDB. 
  2. On Day 2, lets say you deleted 2 softwares, we get 8 software info as part of day 2 data pull. Here, we do an apple to apple comparison and identify the deleted software information as part of Software Remove flow and delete them from CMDB. 

Hope this answer helps. Let me know if you have any questions. 

 

Thanks,

Murali

sidkak_28
Tera Contributor

@Murali Reddy1 Great article and detailed information on the SG-AWS Connector. Little new to SG connectors but answer to the below basic question with help address alot of customer queries.

 

However, I have a question w.r.t the IH Transaction License usage while making use of this SG Connector.

Suppose, we have 10000 EC2s and 5000 other resource types on AWS and i also want to get deep discovery data (installed software etc.) will each record fetched be considered a transaction or a single call with entire payload based on a schedule be considered a transaction.

2. Even after the first go, the daily updates will count as one transaction for each update or one transaction or the entire payload ?

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

@sidkak_28 I am not sure about the License cost. Please reachout to the ServiceNow consultants assigned to your company to get details related to license information. 

Carsten Schnor1
Tera Expert

Hi @Murali Reddy1 ,

 

can someone advise how a customer is supposed to add own business needs into the discovery process without breaking the upgrade/update paths.

 

Consider the following scenario:

a customer wants to maintain an attribute that can not be discovered in AWS, but there is a business logic available that would define a default value.

E.g. the Manufacturer Attribute for anything discovered in AWS would point to Amazon.

 

As some tables are used not solely for AWS I would exclude default values.

 

So - trying to avoid possibly complex "Business Rules" my preferred option would be the implementation of a "execute after" script. But would that be considered as customization and would be overwritten with next SG-AWS update? Or would that survive a plugin update?

 

Best,

 

Carsten

 

adinad
Tera Guru

HI @Murali Reddy1 ,

I have some questions regarding the AWS scripts:

  1. Can the scripts be deployed using one single account (the one created in script - EnableAWSConfig.yml )? Will  the scripts work for a single account setup?
  2. What is AWS system manger admin and aws system manager member scripts does ? can this scripts  be executed in one single account setup (setup in script EnableAWSConfig.yml )  or this has to be admin / member account type of setup ?
  3. will the s3 bucket will be working with aws config or just with AWS system manager ?
  4. should the s3 bucket be created in same account where system manager / inventory is enabled ? or this should be in a separate aws account ? 
  5. Does AWS config / aggregator need to write to S3 buckets ? what is the relationship between aws config vs s3 bucket before things gets written to the CMDB ?  Do we have scripts for CF template to achieve this  ?
  6. Will the service now user setup scripts provided will work one single account setup along with necessary roles and permissions ?

Thanks,

Adina

 

dsg
Tera Contributor

Hi @Murali Reddy1 

Is there a reason the iam:CreateAccessKey and iam:DeleteAccessKey is missing from the current SetupSnowUser script?  It's easy enough to add it but I just wondered if some other issue was found with it...

 

Thanks,

Don

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi @dsg, These two permissions are intentionally not included in script as its a optional feature. Hence, we documented it. Do you see any other issue?

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi @adinad , pls find my answers inline

 

  1. Can the scripts be deployed using one single account (the one created in script - EnableAWSConfig.yml )? Will  the scripts work for a single account setup? --> Yes, it will work, you can follow the same steps in the single account. 
  2. What is AWS system manger admin and aws system manager member scripts does ? can this scripts  be executed in one single account setup (setup in script EnableAWSConfig.yml )  or this has to be admin / member account type of setup ? --> These two scripts are for setting up SSM in multiple accounts. For single account, you can follow AWS official documentation - https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-configuring.html
  3. will the s3 bucket will be working with aws config or just with AWS system manager ? --> AWS Config will have its own S3 bucket to store the config details. We will be using Config APIs to get the stored details, the ServiceNow user you create will not have access to this S3 bucket. For our SSM usecase, we explicitly define a specific S3 bucket which ServiceNow user will have access with RW permission. 
  4. should the s3 bucket be created in same account where system manager / inventory is enabled ? or this should be in a separate aws account ? -> As shown in the diagram, you can create any AWS account. But you have to fill those details in the Guided setup input. 
  5. Does AWS config / aggregator need to write to S3 buckets ? what is the relationship between aws config vs s3 bucket before things gets written to the CMDB ?  Do we have scripts for CF template to achieve this  ? AWS Config / Aggregator has internal logic to store all the details in an S3 bucket and they expose the data via API. More details can be found here - https://docs.aws.amazon.com/config/latest/developerguide/aggregate-data.html
  6. Will the service now user setup scripts provided will work one single account setup along with necessary roles and permissions ? - Yes, it is designed for both single and multi account. 

Hope this helps. 

Thanks,

Murali

Taha Aw
Tera Contributor

Hi @Murali Reddy1 
Thanks for you effort and answering our questions!
I just deployed this on our environment last week V2.2.1 and the team is asking me if its possible from a list view to search for a VM instance and see which AWS account, datacenter and zone it belongs to.
Is that possible? I search and I cant seem to find a solution.

Jack Covert
ServiceNow Employee
ServiceNow Employee

@Taha Aw, if you build a query with query builder, I believe it gives you a list view that you can then filter. Would that work for you? 

Anshuman Damani
Tera Contributor

Hi @Murali Reddy1 , 

 

Through the SSM and SAM Professional, will I be able to capture Oracle database details for Oracle compliance also ? If not, what would be my options ?

 

Best Regards,

Anshuman Damani

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

@Anshuman Damani Yes if it is created via AWS Database feature. If you installed Oracle directly on VM, SSM doesn't keeps track of the installed software. There is a feature being built for upcoming releases to discover these type of Software CIs. 

Jonas14
Tera Explorer

I'm receiving this error (S3 Get Object API call FAILED for: account number) when trying to run SG-AWS-SSM-SendCommand Data source to get the process information. 

 

When I check the logs I see: 

NoSuchKey - The specified key does not exist

 

Any clue about what I'm missing here? I'm able to see on AWS that the bucket is created and there is data being stored.

 

Screenshot 2023-10-31 at 10.16.15.pngScreenshot 2023-10-31 at 10.23.09.png

Saul G
Tera Contributor

@Jonas14 I am seeing the same thing. Looks like the S3 object is not created/available until seconds after the GetObject flow is called. Did you resolve your issue

Jonas9
Tera Explorer

Hey Saul!

I had the same conclusion. 

Not solved yet. 🙁

Jonas14
Tera Explorer

I'm having one issue with SG AZURE.

 

When the schedule import "SG-Azure VM Config Data" runs, I can see that the date is being stored on sn_sg_azure_integ_vm_config_data table, but it seems like when trying to run the transform, an error comes up.

 

sn_sg_azure_integ_vm_config_data

Screenshot 2023-11-10 at 09.35.46.png

 

 

 

 

Import log error message:

String cannot be cast to class com.snc.cobject.ComplexObject (java.lang.String is in module java.base of loader 'bootstrap';

 

Screenshot 2023-11-10 at 09.32.09.png

 

ag15151
Tera Explorer

@Murali Reddy1 As part of the AWS Service Graph Connector setup for AWS, if EKS data does not need to be pulled, can the step to Configure the required EC2 resources for EKS be skipped? We would like to avoid needing to set up an EC2 instance/S3 bucket just to pull EKS info, and want to make sure this won't impact other resources pulled

Tobias20
Tera Contributor

Hi @Murali Reddy1,

 

I already raised a HI case (CS7196249) for this, but posting here as well for yoru awareness. I have opened this case to bring a Bug to your attention, leading to an infinite loop, locking up node resources.

 

The particular script include is called “SgAwsDataSourceUtils” and the issue is within the method “invokeSelectAggregateResources” (although a similar pattern may exist in different methods too.

What this method does in general is to trigger a Flow Action that performs an API call to AWS to receive certain information from it. As the Calls are batched by design to avoid too large responses / timeouts, there is a need to repeat this action n number of times until no more additional results are returned by the endpoint. To accomplish this, the method uses while loop and evaluates the end condition on each execution.

 

The loop also contains certain error handling scenarios, one of which is if the endpoint returns an HTTP 400 code with a specific error message (token expiration) it is able to generate a new token and then continue with further calls. In case after a new token is generated, it is still receiving the same error, there is also a safeguard to avoid infinite loops, by increasing a counter and cancelling the loop in case it exceeds a certain threshold.

 

Tobias20_0-1709303068727.png

 

Now the problem with this: Like I mentioned, the error handling only applies, if error code 400 is returned with a specific error message in the response body. In any other case where HTTP 400 is returned, the error is not handled, and is considered a “successful” response. So it continues the pattern to try and retrieve the next batch of results. As the responses never contain any actual results, this produces an infinite loop. This is what happened yesterday, an HTTP 400 was returned, but with an unexpected message in the request body (as for some reason, the access details were not properly passed into the flow action:

 

Tobias20_3-1709303253918.png

 

Tobias20_2-1709303068734.png

 

Without knowing which exact circumstances lead to the flow action being called without the token details, I believe it should still be necessary to harden the respective script include / method to be able to deal with these kinds of unexpected errors without running into the infinite loop situation.

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hello @Tobias20, I moved out of the SGC team and unable to help you better. Please reachout to support team for any help. 

RishabhA
Tera Contributor

Hi Murali,

Can you help me Im having service now developer account I want to connect aws with service account developer account I came accross with AWS Service Management Connector but I think it needs the paid service is there any other solution I just need to do POC for of the client

Vishnu_X95
Tera Contributor

Hi @Murali Reddy1 ,

 

We are trying to set up the SG connector for AWS and we seem to having an issue with the SG-AWS Configuration Properties section.


We are presented with the error in the diagnostics results.

"Central Aggregator Account Id: 1234xxxx000 IAM access accessible -FAILED.
Check if ServiceNow user has IAM role (sts:AssumeRole) is setup properly in the account.
Refer to SG AWS Setup Instructions > ServiceNow user Setup"

 

The AWS team have confirmed that the specific role has been set up.

 

The AWS Team have all the required information that needs to go into the SG-AWS Configuration Properties section, however we seem to be having trouble on what information goes where in this properties section.

It would really help us if you could share a screenshot or a document if any on what needs to be filled in the "SG-AWS Configuration Properties section" for all the form fields. Especially the mandatory ones. We are trying to find  a sample that can help us correctly fill in the information.

 

Thanks in advance.

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi @Vishnu_X95 , The KB article has all the configuration details. Please raise a support ticket for further assistance. Thanks. 

Amit Sharma7
Tera Contributor

Hi @Murali Reddy1 

Thank you for sharing valuable information about SG-AWS. With your help, I successfully integrated SG-AWS with ServiceNow. However, I have a few questions after completing the integration and would appreciate your guidance:

  1. If a site-to-site connectivity is established between AWS and the customer’s datacenter, how the connectivity for SG-AWS will be established? Specifically, will ServiceNow fetch data only from S3 buckets exposed to the internet?
  2. Since the MID server is not used out-of-the-box for this integration, are there any pros and cons we can discuss with the customer to determine the most suitable option based on their infrastructure?

Please guide. 

 

Thank You

Amit

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

Hi @Amit Sharma7 ,

Thank you for the feedback. Here are my responses to your questions:

  1. We will make direct AWS API calls from the Now instance to AWS using the credentials provided as part of the guided setup.

  2. MID server-based discovery is provided by the Cloud Discovery product. The SGC-AWS product is designed as a MID-less solution option. If you prefer to use MID for SGC-AWS, it is possible as described in the article. However, it has shown performance issues for customers with a large number of accounts.

I hope this answers your questions. If you have any further inquiries, please feel free to raise a case with the team.

Thanks,
Murali

GayatreeN
Tera Contributor

 

Hello,
We are currently trying to set up the SG connector for AWS PDI , but we are facing an issue with the SG-AWS configuration. The diagnostic test completes successfully, but when attempting to connect through the Service Graph Connector, we are seeing the error: "Method failed: (/) with code: 400."  in Service Graph Connection > Configure the Connection. I have attached relevant details related to this issue for further analysis. Could someone kindly assist us in resolving this problem?
I would like to know if the Service Graph Connector is allowed for use in a Personal Developer Instance (PDI), or if it requires a specific licensed version for usage. Could you please clarify the licensing requirements for using this connector in a PDI?

 

 

 

 

Murali Reddy1
ServiceNow Employee
ServiceNow Employee

@GayatreeN Please raise a case for further assistance. 

andylockran
Tera Explorer

Howdy @Murali Reddy1 ,

 

This is pretty useful - I've a use case where the teams are developer teams and this needs to monitor a serverless environment, rather than just applications running on EC2 / EKS.

 

What't the best way to contribute; to be able to create configurations for mapping more of the AWS:: resourceTypes, and making sure that enough information is being captured about the different things to ensure that relationships are maintained (e.g. making sure that all resources in the same CloudFormation stack maintain that relationship - and changes to stack modifications that orphan resources are flagged as such in ServiceNow.

 

Would love to be able to contribute; but can't see where. (I'm relative new to ServiceNow, but more competent in AWS)

RGreene
Tera Expert

I like the SGC for AWS but how do you minimize the cost of using AWS Configure?  The cost for us last year was the low six figures.  So it is somewhat pricey for a group that has a lot of changes.

VenkataSubrA
Mega Explorer

This is pretty useful  and like SG for AWS

 

Version history
Last update:
‎08-04-2025 08:47 AM
Updated by:
Contributors