Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Amazon ECS resource discovery with Patterns

The ServiceNow Discovery application uses the Amazon AWS - ECS pattern to find resources managed by the Amazon Elastic Container Service (Amazon ECS). This includes resources that are run on the Fargate launch type. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.

Amazon ECS is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers. AWS Fargate is a compute engine for Amazon ECS that enables AWS customers to run containers without having to manage servers or clusters.

Discovery uses the Amazon AWS - ECS pattern to run horizontal discovery.

Starting with Discovery and Service Mapping Patterns version 1.18.0, the Amazon AWS - ECS pattern supports the discovery of Amazon Elastic Container Registry (Amazon ECR) images. For more information on container scanning, see Scan container images.

Starting with Discovery and Service Mapping Patterns version 1.31.0, you can choose to discover Docker image CIs only, without discovering Docker container CIs. Check your entitlements to determine whether you have access to 2026 Container Packaging. For more information, see Disable Docker container CI discovery.

Request apps on the Store

Visit the ServiceNow Store to view all the available apps, and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the ServiceNow Store version history release notes.

Amazon ECS data model

The Amazon AWS - ECS pattern introduces the following CI classes that extend an existing CMDB class.

CI classExtends from
AWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]Virtual Machine Object [cmdb_ci_vm_object]
AWS Cloud ECS Service [cmdb_ci_cloud_ecs_service]Virtual Machine Object [cmdb_ci_vm_object]
AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]Virtual Machine Object [cmdb_ci_vm_object]
AWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]Virtual Machine Object [cmdb_ci_vm_object]

Prerequisites

  • Create AWS credentials with ECS resources viewing privileges

    In the AWS console, create AWS credentials with privileges to view ECS resources. For more information, see: https://docs.aws.amazon.com/en_pv/AmazonECS/latest/userguide/get-set-up-for-amazon-ecs.html.

    Note: The API requests use AWS Signature Version 4 to authenticate. When the correct credentials are provided, authentication is done internally for the Cloud API Call pattern steps.

  • Create AWS cloud credential records or use temporary credentials

    In the ServiceNow AI Platform, create AWS credential records. You can also use a temporary credential generated by the AWS Security Token Service (AWS STS) for IAM roles. For more information, see Cloud credentials

  • Create AWS cloud service accounts

    • In the ServiceNow AI Platform, create AWS cloud service accounts using permanent or temporary AWS credentials. For more information, see Setting up AWS service accounts.
    • In the Cloud Service Account record, select Discover Datacenters to find AWS Datacenters (LDCs) for the configured AWS cloud service account.
  • Schedule an AWS discovery

    In the ServiceNow AI Platform, schedule either a full AWS pattern discovery or only an ECS pattern discovery.

    To enable the pattern to find the resource Tags, the parent ECS table (VM Object) must have a related entry for the cmdb_key_value table:

    1. In the ServiceNow AI Platform navigation bar, navigate to All > Configuration > Identification/Reconciliation, and select CI Identifiers.
    2. Search for and open the VM Object record.
    3. Select the Related Entries tab and make sure it's configured as shown in the VM Object Related Entry figure. If it isn't, specify a new related entry: In the Related Entries related list, select New, fill out the form, and then select Submit.
Image omitted: vm-object-related-entry.png
Related entry configuration

Verify the REST API Permissions

Download the Cloud Discovery patterns spreadsheet so you can grant user permissions required for running the Discovery patterns. In addition to permissions, the spreadsheet also includes useful information such as pattern names, types, CI Classes, and links to vendor documentation. New patterns are available quarterly, so check periodically to be sure you have the latest version of the spreadsheet.

Note: You can test the AWS REST APIs using Postman API platform. For more information, see the How to test AWS REST API using POSTMAN [KB0782183] article in the Now Support Knowledge Base.

Data collected by Discovery during horizontal discovery

Discovery populates the data in the CMDB when running the Amazon AWS - ECS pattern.

FieldDescription
Object ID [object_id]The Amazon Resource Name (ARN) that identifies the cluster.
Name [name]A user-generated string used to identify the cluster.
Registered Container Instances Count [registered_container_instances_count]The number of container instances registered to the cluster. The status of these container instances can be either ACTIVE or DRAINING.
FieldDescription
Object ID [object_id]The full ARN of the task definition.
Name [name]The name of the family to which this task definition is registered.
Revision [revision]The revision of the task in a particular family. This is the version number of the task definition in a family.
Network Mode [network_mode]The Docker networking mode to use for the containers in the task. Valid values: None, bridge, awsvpc, host.
CPU [cpu]The number of CPU units used by the task.
Memory [memory]The amount of memory, in mebibyte (MiB), used by the task.
FieldDescription
Object ID [object_id]The ARN that identifies the task.
Name [name]A user-generated string used to identify the task.
Launch Type [launch_type]The launch type on which the task runs.
Operational status [operational_status]The health status of the task, determined by the health of the essential containers in it.
CPU [cpu]The number of CPU units used by the task, as stated in the task definition.
Memory [memory]The amount of memory, in MiB, used by the task, as stated in the task definition.
FieldDescription
Object ID [object_id]The ARN that identifies the service.
Name [name]The name of the service.
Launch Type [launch_type]The launch type on which the service runs.
Scheduling Strategy [scheduling_strategy]The scheduling strategy to use for the service.
FieldDescription
Container id [container_id]The ARN of the container.
Name [name]The name of the container.
Status [status]The last-known status of the container.
Operational status [operational_status]The health status of the container.
CPU [cpu]The number of CPU units set for the container.
Memory [memory]The hard limit of memory, in MiB, set for the container.
FieldDescription
Object ID \[object\_id\]The ARN that identifies the virtual machine (VM) instance. Note: Complete Virtual Machine Instance information is discovered in a different EC2 cloud pattern. In Amazon ECS resource discovery, only the object_id is parsed to aid with the unique identification of the CI.
FieldDescription
Key [key]The Tag key.
Value [value]The Tag value.
Configuration item [configuration_item]References the discovered CI that the tag is associated with.
FieldDescription
Name [name]Name of the Docker image.
Image Digest [image_digest]Unique identifier for the Docker image.
Image ID [image_id]12-character length unique identifier for the Docker image.
FieldDescription
Name [name]Fully qualified name of the repository containing the Docker image.
FieldDescription
Name [name]The Docker image tag.
Category [category]Fully qualified name of the repository containing the Docker image.

On the Dependency Views map, you can see all discovered resources in your organization that are managed by Amazon ECS, and the relationships between them.

In this example, the AWS Cloud ECS Cluster CI is hosted on an AWS Datacenter. It runs two AWS Cloud ECS Tasks and two AWS Cloud ECS Services, and uses three Docker Containers.

Image omitted: cluster-1st-level-dependency-view.png
CIs and connections on a Dependency Views map

CI relationships

The Amazon AWS - ECS pattern creates the following relationships and references to support Amazon ECS resource discovery. References link to records in other tables and don't appear in the CI Relationship [cmdb_rel_ci] table.

CIRelationshipCI
AWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
Virtual Machine Instance [cmdb_ci_vm_instance]Used by::UsesAWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]
Virtual Machine Instance [cmdb_ci_vm_instance]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
AWS Cloud ECS Service [cmdb_ci_cloud_ecs_service]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
AWS Cloud ECS Service [cmdb_ci_cloud_ecs_service]Runs on::RunsAWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]
AWS Cloud ECS Service [cmdb_ci_cloud_ecs_service]Uses::Used byAWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]
AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]*Runs on::RunsAWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]
AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]*Runs on::RunsVirtual Machine Instance [cmdb_ci_vm_instance]
AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]Runs on::RunsDocker Container [cmdb_ci_docker_container]
AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]Uses::Used byAWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]
AWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
AWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]Used by::UsesAWS Cloud ECS Service [cmdb_ci_cloud_ecs_service]
AWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]Used by::UsesAWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]
Docker Container [cmdb_ci_docker_container]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
Docker Container [cmdb_ci_docker_container]Used by::UsesAWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]
Container Repository [cmdb_ci_container_repository]Hosted on::HostsAWS Datacenter [cmdb_ci_aws_datacenter]
Container Repository Entry [cmdb_ci_container_repository_entry]Hosted on::HostsContainer Repository [cmdb_ci_container_repository]
Docker Image [cmdb_ci_docker_image]Provisioned From::ProvisionedContainer Repository Entry [cmdb_ci_container_repository_entry]
Docker Image [cmdb_ci_docker_image]Instantiates::Instantiated byDocker Container [cmdb_ci_docker_container]

*The launch type determines which relationship is created. For Fargate launch type tasks, the relationship is created with the AWS Cloud ECS Cluster. For EC2 launch type tasks, the relationship is created with the Virtual Machine Instance.

CIFieldReferenced CI
Key Value [cmdb_key_value]Configuration item [configuration_item]AWS Cloud ECS Cluster [cmdb_ci_cloud_ecs_cluster]
Key Value [cmdb_key_value]Configuration item [configuration_item]Virtual Machine Instance [cmdb_ci_vm_instance]
Key Value [cmdb_key_value]Configuration item [configuration_item]AWS Cloud ECS TaskDefinition [cmdb_ci_cloud_ecs_task_definition]
Key Value [cmdb_key_value]Configuration item [configuration_item]AWS Cloud ECS Task [cmdb_ci_cloud_ecs_task]
Key Value [cmdb_key_value]Configuration item [configuration_item]AWS Cloud ECS Service [cmdb_ci_cloud_ecs_service]

AWS tag discovery

The Amazon AWS - ECS pattern collects tags and populates them in the Key Value [cmdb_key_value] table.

FieldDescription
Key \[key\]The Tag key.
Value \[value\]The Tag value.
Configuration item \[configuration\_item\]References one of the following CIs that the tag is associated with: - AWS Cloud ECS Cluster \[cmdb\_ci\_cloud\_ecs\_cluster\] - Virtual Machine Instance \[cmdb\_ci\_vm\_instance\] - AWS Cloud ECS TaskDefinition \[cmdb\_ci\_cloud\_ecs\_task\_definition\] - AWS Cloud ECS Task \[cmdb\_ci\_cloud\_ecs\_task\] - AWS Cloud ECS Service \[cmdb\_ci\_cloud\_ecs\_service\]

Parent Topic:AWS discovery using patterns