

# Certificate and TLS endpoint telemetry

The AWS Workload Credentials Provider can send telemetry about the certificates it deploys and the TLS endpoints it finds on your hosts. Telemetry goes to certificate inventory for organizations, which shows those certificates and where they're used, alongside your ACM and AWS Private CA certificates.

Telemetry requires an ACM plan. The inventory uses telemetry only for organizations that have a plan, and only from accounts and Regions in the inventory scope. It discards other telemetry without returning an error. To choose a plan, see [ACM plans](acm-plans.md). To set up the inventory and search it, see [Certificate inventory for organizations](acm-inventory.md).

The provider sends two types of telemetry, and you turn each one on separately. Discovery reports the certificates and TLS settings returned by the ports you configure. Automation reports the result of each certificate refresh.

Nothing is sent until you turn a type on. To see exactly what would be sent, start with a [Preview telemetry with a dry run](#acm-cert-automation-telemetry-dry-run).

Telemetry requires Workload Credentials Provider version 4.0.0 or later. Upgrade the provider before you add the telemetry settings to your configuration. Earlier versions fail to parse a configuration that contains `[capabilities.acm.discovery]` or `[telemetry.acm]`.

Telemetry reaches the inventory only from Amazon EC2, Amazon ECS, and Amazon Elastic Kubernetes Service (Amazon EKS). On other compute, including on-premises servers, AWS Lambda, and Kubernetes clusters that aren't Amazon EKS, nothing appears in the inventory.

If your trail or event data store logs data events for certificate telemetry, CloudTrail records each telemetry call that passes request signing, in the Regions where telemetry is available. For more information, see [Sending certificate telemetry (PutCertificateTelemetry)](acm-supported-actions-in-cloudtrail.md#ct-workload-telemetry).

## Get started with telemetry
<a name="acm-cert-automation-telemetry-get-started"></a>

1. Install or upgrade the provider to version 4.0.0 or later from the [releases page](https://github.com/aws/aws-workload-credentials-provider/releases) on the GitHub website. On Amazon ECS and Amazon EKS, rebuild your image with the new version.

1. Grant `workload-telemetry:PutCertificateTelemetry` on `"Resource": "*"` to the provider's identity. See [Required permissions](#acm-cert-automation-telemetry-permissions).

1. Allow HTTPS from the host to the AWS Workload Telemetry endpoint. See [Network requirements](#acm-cert-automation-telemetry-network).

1. Turn on the telemetry types you want with `dry_run = true`, and check the dry-run log. See [Preview telemetry with a dry run](#acm-cert-automation-telemetry-dry-run).

1. Set `dry_run = false` and apply the change. See [Turn on telemetry](#acm-cert-automation-telemetry-enable).

## Telemetry types
<a name="acm-cert-automation-telemetry-types"></a>

The following table describes each type and how to turn it on.


| Type | What it reports | When it's sent | How to turn it on | 
| --- | --- | --- | --- | 
| Discovery | The certificate and TLS settings returned by each port you configure | At the end of each discovery run. The first run starts within 5 minutes of the provider starting, then runs about every 24 hours. | [capabilities.acm] enabled = true and [capabilities.acm.discovery] enabled = true | 
| Automation | The result of each certificate refresh | About once an hour, and when the provider stops. | [telemetry.acm] enabled = true | 

Turning on discovery is your consent to send discovery telemetry. The `[telemetry.acm]` setting doesn't turn discovery telemetry on or off.

Discovery runs on Amazon EC2, Amazon ECS, and Amazon EKS. It connects to `127.0.0.1` on each configured port, and to `::1` if that connection is refused. It doesn't run on AWS Lambda or on compute the provider can't identify.

**Important**  
In Amazon ECS and Amazon EKS, the provider reaches your application only through loopback, so it must share the application's network namespace. On Amazon ECS, run both containers in the same task with the `awsvpc` network mode. In any other network mode, the provider logs a warning and doesn't start discovery. On Amazon EKS, run both containers in the same pod without `hostNetwork: true`. With `hostNetwork: true`, discovery reaches every service listening on the node's loopback and reports them under the provider's identity.

## What the provider sends
<a name="acm-cert-automation-telemetry-contents"></a>

Every request includes the following information about the host.


| Field | Example | Description | 
| --- | --- | --- | 
| computeId | i-1234567890abcdef0 | Identifies the compute. On Amazon EC2, the instance ID. On Amazon ECS, the full task ARN, which includes the account ID and cluster name. On Amazon EKS, {{namespace}}/{{pod-name}}/{{pod-UID}}, with no instance ID. | 
| idempotencyKey | i-1234567890abcdef0:6f1c2e8a-3b4d-4e5f-8a9b-0c1d2e3f4a5b:acm:cert\_discovery:0:0 | A value that identifies the request so that a retry isn't counted twice. It starts with computeId and includes a random value generated each time the provider starts. | 
| computeType | EC2 | EC2, ECS, or EKS | 
| os | LINUX | The operating system | 
| arch | X86\_64 | The processor architecture | 
| schemaVersion | 1 | The request format version | 

### Discovery
<a name="acm-cert-automation-telemetry-discovery"></a>

Discovery reports one observation for each port and SNI hostname that returns a certificate, so one port can produce several observations.


| Field | Description | 
| --- | --- | 
| scanTime | When the scan started, in milliseconds since the Unix epoch. Every request from the same scan has the same value. | 
| scanId | Identifies the scan. Every request from the same scan has the same value. | 
| batchIndex, totalBatches | A large scan is split into several requests. batchIndex is this request's number, starting at 1, and totalBatches is the number of requests in the scan. | 
| port | The port probed | 
| sni | The hostname sent as SNI, if any | 
| outcome | The result of the probe. SUCCESS means the port returned a certificate. | 
| certificateDer, chainDer | The leaf certificate and its chain, as base64-encoded DER | 
| tlsVersion | The TLS version negotiated, for example TLSv1.3. Present when the handshake completes. | 
| cipherSuite | The cipher suite negotiated, by IANA name, for example TLS\_AES\_256\_GCM\_SHA384. Present when the handshake completes. | 
| handshakeSignatureScheme | The signature scheme the server used in the handshake, for example ecdsa\_secp256r1\_sha256 | 
| mtlsDetected | Whether the server requested a client certificate | 

Each discovery request also reports totals for the scan: targets probed, successful and failed probes, observations dropped, and the number of certificates configured for automation. Only ports that return a certificate are sent. Ports that refuse the connection, time out, don't speak TLS, or fail the handshake are counted in `failedProbes` and not listed. Certificates larger than 16,384 bytes, missing, or not valid are dropped and counted. If a discovery run reaches its time limit, the provider sends the certificates it found with `scanComplete` set to `false`, without the totals.

Telemetry doesn't report the key exchange group, so it doesn't show whether a connection used hybrid post-quantum key exchange.

### Automation
<a name="acm-cert-automation-telemetry-automation"></a>

Automation reports one result for each certificate refresh.


| Field | Description | 
| --- | --- | 
| eventTime | When the refresh finished, in milliseconds since the Unix epoch | 
| certificateArn | The ARN of the ACM certificate | 
| certificateDer, chainDer | The certificate and chain the provider deployed | 
| result | The success status, or the failure details | 
| refreshDurationMilliseconds | How long the export, write, and reload took | 
| consecutiveFailures | The number of failures in a row before this attempt | 
| refreshCycleId | Identifies the refresh cycle that produced the result. Every record from the same cycle has the same value. The value changes when the provider restarts. | 
| certIndex | The position of the certificate among the configured certificates, sorted by ARN and counted from 0 | 
| configuredCertificateCount | The number of certificates in the provider's automation configuration | 

A successful refresh reports one of the following statuses.


| Status | Meaning | 
| --- | --- | 
| DEPLOYED | New files were written and your refresh command ran. | 
| RELOADED | Files were unchanged and your refresh command ran. | 
| UNCHANGED | Files were unchanged and no command ran. | 
| WRITTEN\_NOT\_RELOADED | New files were written and no refresh command is configured. | 

**Note**  
`DEPLOYED` means the provider ran your refresh command. It doesn't confirm that your server is serving the new certificate.

A failed refresh reports the step that failed (`EXPORT`, `WRITE`, or `RELOAD`), an error code from a fixed list (for example `AccessDeniedException`, `EACCES`, or `CommandFailed`), and whether the files on disk were replaced (`NOT_REPLACED`, `PARTLY_REPLACED`, or `REPLACED`). For a failed refresh, `certificateDer` and `chainDer` are the files on disk, not a newly deployed certificate.

Containers on Amazon ECS and Amazon EKS send automation telemetry the same way hosts do, identified by the task ARN or the pod.

### What isn't sent
<a name="acm-cert-automation-telemetry-not-sent"></a>

The provider never sends private keys, error message text, or application traffic.

### Examples
<a name="acm-cert-automation-telemetry-examples"></a>

The following examples show requests as they appear in the dry-run log. Certificate data is truncated.

Discovery:

```json
{
  "telemetry": {
    "discovery": {
      "scanTime": 1793315962483,
      "scanId": "i-1234567890abcdef0:1793315962",
      "observations": [
        {
          "port": 443,
          "sni": "www.example.com",
          "outcome": "SUCCESS",
          "certificateDer": "MIIFazCCBFOgAwIBAgIQ...",
          "chainDer": ["MIIEkjCCA3qgAwIBAgIQ..."],
          "mtlsDetected": false,
          "tlsVersion": "TLSv1.3",
          "cipherSuite": "TLS_AES_256_GCM_SHA384",
          "handshakeSignatureScheme": "ecdsa_secp256r1_sha256"
        }
      ],
      "batchIndex": 1,
      "totalBatches": 1,
      "scanComplete": true,
      "totalTargetsProbed": 3,
      "successfulProbes": 1,
      "failedProbes": 2,
      "droppedObservations": 0,
      "configuredCertificateCount": 2
    }
  },
  "computeId": "i-1234567890abcdef0",
  "idempotencyKey": "i-1234567890abcdef0:6f1c2e8a-3b4d-4e5f-8a9b-0c1d2e3f4a5b:acm:cert_discovery:0:0",
  "computeType": "EC2",
  "os": "LINUX",
  "arch": "X86_64",
  "schemaVersion": 1
}
```

Automation, with one successful refresh and one failure:

```json
{
  "telemetry": {
    "automation": {
      "records": [
        {
          "certificateArn": "arn:aws:acm:us-east-1:111122223333:certificate/12345678-1234-1234-1234-123456789012",
          "eventTime": 1793319562417,
          "result": { "success": "DEPLOYED" },
          "certificateDer": "MIIFazCCBFOgAwIBAgIQ...",
          "chainDer": ["MIIEkjCCA3qgAwIBAgIQ..."],
          "refreshDurationMilliseconds": 1250,
          "consecutiveFailures": 0,
          "configuredCertificateCount": 2,
          "refreshCycleId": "0123456789abcdef0123456789abcdef-8",
          "certIndex": 0
        },
        {
          "certificateArn": "arn:aws:acm:us-east-1:111122223333:certificate/87654321-4321-4321-4321-210987654321",
          "eventTime": 1793319562731,
          "result": { "failure": { "stage": "EXPORT", "code": "AccessDeniedException", "filesOnDisk": "NOT_REPLACED" } },
          "certificateDer": "MIIFazCCBFOgAwIBAgIQ...",
          "chainDer": ["MIIEkjCCA3qgAwIBAgIQ..."],
          "refreshDurationMilliseconds": 310,
          "consecutiveFailures": 3,
          "configuredCertificateCount": 2,
          "refreshCycleId": "0123456789abcdef0123456789abcdef-8",
          "certIndex": 1
        }
      ]
    }
  },
  "computeId": "i-1234567890abcdef0",
  "idempotencyKey": "i-1234567890abcdef0:6f1c2e8a-3b4d-4e5f-8a9b-0c1d2e3f4a5b:acm:cert_automation:16:0",
  "computeType": "EC2",
  "os": "LINUX",
  "arch": "X86_64",
  "schemaVersion": 1
}
```

## Preview telemetry with a dry run
<a name="acm-cert-automation-telemetry-dry-run"></a>

A dry run writes each request to a local log instead of sending it. Turn on the types you want to preview and set `dry_run = true`:

```toml
[telemetry]
dry_run = true

[telemetry.acm]
enabled = true

[capabilities.acm]
enabled = true

[capabilities.acm.discovery]
enabled = true
```

The provider writes each request as one line of JSON to `acm_provider_telemetry_dryrun.log` in its log directory: `/opt/aws/workload-credentials-provider/logs/` on Linux, `C:\ProgramData\AWS\WorkloadCredentialsProvider\logs\` on Windows, and `/app/logs/` in the container image. If `log_to_file` is `false`, requests are written to the console instead. The `log_level` setting doesn't filter them.

Discovery requests are written at the end of each discovery run. Automation requests are written about once an hour, and when the provider stops.

A discovery run that finds no certificate sends nothing and writes nothing, so an empty log is expected when no configured port returns a certificate.

The JSON in the log is the same request the provider sends. On the wire, it's encoded as CBOR.

When you're ready to send telemetry, set `dry_run = false` and apply the change.

## Turn on telemetry
<a name="acm-cert-automation-telemetry-enable"></a>

**Discovery**

To turn on discovery, enable it under the ACM capability:

```toml
[capabilities.acm]
enabled = true

[capabilities.acm.discovery]
enabled = true
```

By default, discovery probes ports 443, 8443, and 4443 without SNI. To choose the ports, map each port to the hostnames to send as SNI. Each port is probed once without SNI, then once for each hostname. You can configure up to 32 ports and up to 32 hostnames for each port.

```toml
[capabilities.acm.discovery.discovery_targets]
443 = ["api.example.com", "www.example.com"]
8443 = []
```

Each discovery run has 300 seconds to finish. To change the limit, set `timeout_secs_override` under `[capabilities.acm.discovery]`. The minimum is 60 seconds.

**Automation**

To turn on automation telemetry, enable it under `[telemetry.acm]`:

```toml
[telemetry.acm]
enabled = true
```

**Apply the change**

Apply the new configuration with `acm reload`. The command validates the new configuration, re-applies file permissions, and restarts the ACM service. It doesn't affect the Secrets Manager capability. For more information, see [Dynamic configuration reload](acm-certificate-automation.md#acm-cert-automation-reload).

`acm reload` works only for host installs. On Amazon ECS and Amazon EKS, rebuild and redeploy the image with the new configuration.

## Required permissions
<a name="acm-cert-automation-telemetry-permissions"></a>

Grant `workload-telemetry:PutCertificateTelemetry` to the provider's own identity: the instance profile, Amazon ECS task role, or the Amazon EKS service account role or Pod Identity role.

```json
{
    "Effect": "Allow",
    "Action": "workload-telemetry:PutCertificateTelemetry",
    "Resource": "*"
}
```

The `PutCertificateTelemetry` action doesn't support resource-level permissions, so you must specify `*` in the `Resource` element.

**Important**  
Don't add this permission to the certificate export role in `role_arn`. The provider signs telemetry with its own credentials, not with the export role.

Without this permission, telemetry calls are denied with `AccessDeniedException`. The same error is returned in Regions where telemetry isn't available, and when request signing fails, for example because the host's clock is wrong. The provider doesn't retry a denied call: it drops the records and logs a warning. CloudTrail records a call denied for missing permission only if your trail or event data store logs certificate telemetry data events.

## Network requirements
<a name="acm-cert-automation-telemetry-network"></a>

The provider sends telemetry over HTTPS to `workload-telemetry.{{region}}.api.aws`, in the Region from its AWS configuration. The host needs outbound HTTPS access to that endpoint, directly or through a proxy. The provider uses the proxy set in `HTTPS_PROXY`, and doesn't use it for hosts listed in `NO_PROXY`.

To see the Regions where telemetry is available, see [AWS Capabilities by Region](https://builder.aws.com/build/capabilities) on the AWS Builder Center website. In other Regions, the provider's requests are denied with `AccessDeniedException`, or the endpoint doesn't resolve, and the records are dropped.

If the provider's AWS configuration turns on FIPS endpoints, for example with `AWS_USE_FIPS_ENDPOINT=true`, the provider sends telemetry to `workload-telemetry-fips.{{region}}.api.aws`. For the Regions with FIPS endpoints, see [FIPS endpoints](https://aws.amazon.com/compliance/fips/) on the AWS website. If you turn on FIPS endpoints in a Region without a telemetry FIPS endpoint, the provider can't send telemetry.

## Turn off telemetry
<a name="acm-cert-automation-telemetry-disable"></a>
+ To stop automation telemetry, set `[telemetry.acm] enabled = false`.
+ To stop discovery telemetry, set `[capabilities.acm.discovery] enabled = false`, or turn off `[capabilities.acm]`. The `[telemetry.acm]` setting doesn't affect discovery telemetry.
+ To stop sending telemetry without turning it off, set `dry_run = true`. The provider writes each request to its log instead of sending it.

On a host, apply the change with `acm reload`. On Amazon ECS and Amazon EKS, rebuild and redeploy the image.

When the provider stops, it sends any queued automation results. Results it can't send within a few seconds are dropped and counted in the provider log.