---
title: Deploying Agentless Scanning
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Cloud Security > Setting up Cloud Security > Cloud
  Security Agentless Scanning > Deploying Agentless Scanning
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Deploying Agentless Scanning

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

This guide helps you plan your Agentless Scanning deployment for your cloud environment. For setup instructions, see [Enabling Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md). To compare self-hosted and Datadog-hosted scanning, see [Choose where scanners run](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning.md#choose-where-scanners-run).

## Overview{% #overview %}

{% section displayed-if="Scanner hosting is Self-hosted" %}
This section only applies to users who meet the following criteria: Scanner hosting is Self-hosted

Datadog recommends the following guidelines:

- Use a dedicated scanner account for multi-account environments.
- Deploy a scanner in each region that contains more than 150 hosts.
- If you use [Cloud Storage Scanning](https://docs.datadoghq.com/security/cloud_security_management/agentless_scanning.md#cloud-storage-scanning), deploy a scanner in each region that contains a data store (for example, S3 buckets).

{% alert level="info" %}
Scanners send only the collected list of packages and host metadata (hostnames, EC2/VM/Compute Engine instance identifiers) to Datadog. All scanned data remains in your infrastructure.
{% /alert %}
{% /section %}

{% section displayed-if="Scanner hosting is Datadog-hosted (SaaS)" %}
This section only applies to users who meet the following criteria: Scanner hosting is Datadog-hosted (SaaS)

{% callout %}
##### Datadog-hosted (SaaS) Agentless Scanning is in Preview


Datadog-hosted scanning supports AWS accounts only. To scan Azure subscriptions or Google Cloud projects, select Self-hosted in the Scanner hosting filter at the top of this page.




[Request Access](https://www.datadoghq.com/product-preview/agentless-saas-mode/)
{% /callout %}

Datadog runs and scales the scanners in its own infrastructure. You don't choose a scanner account, decide how many scanners to deploy, or plan which regions to deploy them in. Instead, you attach the Agentless Scanning permissions to the Datadog integration role in each AWS account you want to scan.

Datadog reads your disk contents in its scanning environment, in the region of your Datadog site, and doesn't retain them. For details, see [Datadog-hosted data residency](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning.md#datadog-hosted-data-residency).
{% /section %}

{% section displayed-if="Scanner hosting is Self-hosted" %}
This section only applies to users who meet the following criteria: Scanner hosting is Self-hosted

## Cloud account and region configuration{% #cloud-account-and-region-configuration %}

The deployment topology you use depends on how many cloud accounts (AWS accounts, Azure subscriptions, or Google Cloud projects) you need to scan, and which regions they cover.

- **Cloud accounts**: If you only need to scan a single account, deploy one or more scanners directly in that account. Otherwise, use a dedicated scanner account, and use delegate roles to grant it access to scan other accounts. This is called **cross-account scanning**.
- **Regions**: A single scanner can scan hosts in any region, including regions other than its own. However, cross-region scanning incurs data transfer costs. Whether you deploy additional scanners depends on how many hosts you have in each region.

These tabs contain information on how to configure your deployment topology. Select the tab that describes how many accounts you need to scan, then learn more based on how many regions you need to cover.

{% tab title="Single account" %}
If you only need to scan a single account, deploy one or more scanners directly in that account.

{% image
   source="https://docs.dd-static.net/images//sensitive_data_scanner/setup/cloud_storage/single-account.f7a9b405e0c1eb04aa3f2e601ebb0faa.png?auto=format"
   alt="Diagram of Agentless Scanning showing the Agentless scanner applied in one account that covers multiple regions" /%}

### Decide how many scanners to deploy for a single account{% #decide-how-many-scanners-to-deploy-single-account %}

A single scanner can scan hosts in any region, including regions other than its own. Cross-region scanning incurs data transfer costs, so the decision of where to deploy additional scanners depends on how many hosts you have in each region.

- **Fewer than \~150 hosts total across all regions**: A single scanner in one region is the most cost-effective setup. The cross-region data transfer costs for scanning remote hosts are lower than the fixed cost of running an additional scanner.
- **More than \~150 hosts in a specific region**: Deploy a dedicated scanner in that region. At this threshold, the egress savings from scanning locally outweigh the cost of running the scanner.
- **Multiple regions above the threshold**: Deploy a scanner in each region that exceeds ~150 hosts. Regions below the threshold can be scanned cross-region from the nearest scanner.

Datadog automatically routes scans to the appropriate regional scanner to minimize cross-region costs.

#### Scanner capacity limits{% #scanner-capacity-limits-single-account %}

Each scanner has throughput limits governed by cloud provider API quotas:

| Limit                                   | Value                                                                                           |
| --------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Maximum scanners per account per region | 4 (hard cap; cloud providers like AWS limit concurrent snapshots to 100 per account per region) |
| Scan interval                           | Every 12 hours                                                                                  |

{% alert level="danger" %}
Do not increase the Autoscaling Group (ASG) desired count beyond four scanners per region. Additional scanners cannot create snapshots due to cloud providers' concurrent snapshot limit.
{% /alert %}

{% /tab %}

{% tab title="Multiple accounts" %}
### Decide which accounts to deploy scanners in{% #decide-which-accounts-to-deploy-scanners-in %}

Datadog recommends using a **dedicated scanner account** to deploy scanners in, and using **cross-account delegate roles** to grant scanners access to target accounts (including the scanner account).

For AWS Organizations, use a [CloudFormation StackSet](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=self_hosted&host=aws#setup) to deploy a delegate role across all member accounts, automating onboarding for cross-account scanning. This StackSet is separate from the StackSet that sets up the Datadog AWS integration in your member accounts. Deploy both StackSets.

The following diagram illustrates cross-account scanning from a central account (Account 4):

{% image
   source="https://docs.dd-static.net/images//sensitive_data_scanner/setup/cloud_storage/central-scanner.2908be09bc9c7ae5a164fce78c10ee1b.png?auto=format"
   alt="Diagram of Agentless Scanning showing the Agentless scanner deployed in a central cloud account" /%}

**If you do not want to grant cross-account permissions**, deploy a scanner in each account instead. This incurs higher costs because each scanner performs cross-region scans within its account.

{% image
   source="https://docs.dd-static.net/images//sensitive_data_scanner/setup/cloud_storage/scanner-in-each-account.148704d6f7f552bc91f086b2352a0c2a.png?auto=format"
   alt="Diagram of Agentless Scanning showing the Agentless scanner deployed in each cloud account" /%}

### Decide how many scanners to deploy for multiple accounts{% #decide-how-many-scanners-to-deploy-multiple-accounts %}

A single scanner can scan hosts in any region, including regions other than its own. Cross-region scanning incurs data transfer costs, so the decision of where to deploy additional scanners depends on how many hosts you have in each region.

- **Fewer than \~150 hosts total across all regions**: A single scanner in one region is the most cost-effective setup. The cross-region data transfer costs for scanning remote hosts are lower than the fixed cost of running an additional scanner.
- **More than \~150 hosts in a specific region**: Deploy a dedicated scanner in that region. At this threshold, the egress savings from scanning locally outweigh the cost of running the scanner.
- **Multiple regions above the threshold**: Deploy a scanner in each region that exceeds ~150 hosts. Regions below the threshold can be scanned cross-region from the nearest scanner.

Datadog automatically routes scans to the appropriate regional scanner to minimize cross-region costs.

#### Scanner capacity limits{% #scanner-capacity-limits-multiple-accounts %}

Each scanner has throughput limits governed by cloud provider API quotas:

| Limit                                   | Value                                                                                           |
| --------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Maximum scanners per account per region | 4 (hard cap; cloud providers like AWS limit concurrent snapshots to 100 per account per region) |
| Scan interval                           | Every 12 hours                                                                                  |

{% alert level="danger" %}
Do not increase the Autoscaling Group (ASG) desired count beyond four scanners per region. Additional scanners cannot create snapshots due to cloud providers' concurrent snapshot limit.
{% /alert %}

{% /tab %}

## Enterprise networking considerations{% #enterprise-networking-considerations %}

By default, the scanner creates a new VPC during deployment. If your organization is using Terraform and has Service Control Policies (SCPs) that restrict VPC creation, use the [custom VPC](https://github.com/DataDog/terraform-module-datadog-agentless-scanner/tree/main/examples/custom_vpc) option during setup to use an existing VPC instead of creating a new one.
{% /section %}

{% section displayed-if="Scanner hosting is Datadog-hosted (SaaS)" %}
This section only applies to users who meet the following criteria: Scanner hosting is Datadog-hosted (SaaS)

## Choose which AWS accounts to scan{% #choose-which-aws-accounts-to-scan %}

You enable Datadog-hosted scanning for each AWS account individually, not for your whole Datadog organization. You can use Datadog-hosted scanning for some AWS accounts and self-hosted scanners for others, for as long as you need.

To scan a single AWS account, [enable Datadog-hosted scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=datadog_hosted#setup) in that account. To onboard several accounts in an AWS organization at once, use a CloudFormation StackSet. For instructions, see [Enabling Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=datadog_hosted#setup).

## Move an account from self-hosted to Datadog-hosted (SaaS) Agentless Scanning{% #move-an-account-from-self-hosted-to-datadog-hosted-scanning %}

Because you set the hosting mode for each account, you can move accounts one at a time. Moving an account doesn't create duplicate findings.

1. [Enable Datadog-hosted scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=datadog_hosted#setup) in the AWS account.
1. In the [Cloud Security Vulnerabilities Explorer](https://app.datadoghq.com/security/csm/vm), confirm that scan results from Datadog-hosted scanning appear for the account.
1. Wait 24 hours to give the self-hosted scanner time to clean up any snapshots it left in the account.
1. Remove self-hosted scanner access to the account:
   - If a central scanner scans the account through a delegate role, delete the delegate role stack in the account.
   - If a scanner runs in the account itself, uninstall it. For instructions, see [Uninstall Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=self_hosted&host=aws#uninstall-agentless-scanning).
{% /section %}

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Cloud Security Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/agentless_scanning.md)
- [Enabling Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md)
- [Updating Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/update.md)



{% image
   source="https://docs.dd-static.net/images/sensitive_data_scanner/setup/cloud_storage/single-account.f7a9b405e0c1eb04aa3f2e601ebb0faa.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/sensitive_data_scanner/setup/cloud_storage/single-account.f7a9b405e0c1eb04aa3f2e601ebb0faa.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/sensitive_data_scanner/setup/cloud_storage/central-scanner.2908be09bc9c7ae5a164fce78c10ee1b.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/sensitive_data_scanner/setup/cloud_storage/central-scanner.2908be09bc9c7ae5a164fce78c10ee1b.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/sensitive_data_scanner/setup/cloud_storage/scanner-in-each-account.148704d6f7f552bc91f086b2352a0c2a.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/sensitive_data_scanner/setup/cloud_storage/scanner-in-each-account.148704d6f7f552bc91f086b2352a0c2a.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}


