Skip to main content

Prepare credentials for OpenTelemetry

Kiro reads your collector's endpoint and credential from an AWS Secrets Manager secret in your account. Kiro stores only the secret's Amazon Resource Name (ARN). It reads the secret each time it sends data, so you can rotate a credential or move your collector by updating the secret. You don't need to change anything in the Kiro console.

You need:

  • One customer managed AWS Key Management Service (AWS KMS) key. Both exports can use the same key.
  • One secret for each OpenTelemetry export that you turn on. OpenTelemetry metrics and real-time events need different secrets, because they send to different paths.

Create the key and the secrets in the same AWS account and Region as your Kiro profile. In the examples, replace <region> with that Region and <account-id> with your AWS account ID.

Step 1: Create a KMS key

Kiro reads the secret from a Kiro-owned AWS account. The default aws/secretsmanager key can't be used across accounts, so you need a customer managed key.

  1. Open the AWS KMS console in the Region of your Kiro profile.

  2. Choose Customer managed keys, and then choose Create key.

  3. For Key type, choose Symmetric. For Key usage, choose Encrypt and decrypt. Choose Next.

  4. Enter an Alias, such as kiro-otel-export. Choose Next, choose your key administrators, and choose Next again.

  5. On Define key usage permissions, choose Next, and then choose Finish.

  6. Open the key. On the Key policy tab, choose Edit, and add this statement. It lets Kiro decrypt the secret only through Secrets Manager in your Region.

    json
    { "Sid": "AllowKiroDecryptViaSecretsManager", "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": ["kms:Decrypt", "kms:DescribeKey"], "Resource": "*", "Condition": { "StringEquals": { "kms:ViaService": "secretsmanager.<region>.amazonaws.com" } } }
  7. Choose Save changes.

Step 2: Write the secret value

The secret is a JSON object with two keys:

json
{ "OTEL_EXPORTER_OTLP_ENDPOINT": "https://<collector-host>", "OTEL_EXPORTER_OTLP_HEADERS": "<Header-Name>=<value>" }
  • OTEL_EXPORTER_OTLP_ENDPOINT is your collector's endpoint. It must use https://, and its host must be a domain name or a public IP address, not an internal IP address or a one-word name such as localhost. It can't contain credentials.
  • OTEL_EXPORTER_OTLP_HEADERS is the authentication header, in Name=value format. Kiro splits each pair on the first =, so base64 padding such as == is kept.

The two exports use the secret differently:

OpenTelemetry metricsOpenTelemetry real-time events
SignalOTLP metricsOTLP logs, one record per event
ProtocolgRPC (default) or HTTP/protobuf, chosen in the consoleHTTP/protobuf only, with gzip compression
Endpoint pathFor HTTP/protobuf, Kiro adds /v1/metrics unless the URL already ends with it. For gRPC, Kiro uses the URL as it isKiro adds /v1/logs unless the URL already ends with it
HeadersOne headerOne or more headers, separated by commas. A value can't contain a comma

Over the public internet, your collector must be reachable from the internet. With any connectivity, it must present a publicly trusted TLS certificate, and Kiro rejects self-signed certificates and internal IP addresses. If your collector is not on the public internet, see Private connectivity.

Values by platform

Use an ingestion credential, not an administrative credential.

PlatformMetrics protocol and endpointEvents endpointHeaderCredential
HoneycombgRPC, https://api.honeycomb.io:443https://api.honeycomb.iox-honeycomb-team=<ingest-key>An ingest key: the key ID and key secret together, not the key ID alone
Grafana CloudHTTP/protobuf, https://otlp-gateway-<zone>.grafana.net/otlphttps://otlp-gateway-<zone>.grafana.net/otlpAuthorization=Basic <base64>The base64 encoding of <instance-id>:<token>. The token starts with glc_. Grafana Cloud needs Cumulative temporality for metrics. Before November 26, 2026, Grafana Cloud rejects the daily metrics as too old. See Check your platform's time window
DatadogHTTP/protobuf, https://otlp.datadoghq.com/v1/metricshttps://otlp.datadoghq.comdd-api-key=<api-key>An API key, not an application key. Use the endpoint for your Datadog site, such as datadoghq.eu
DynatraceHTTP/protobuf, https://<environment-id>.live.dynatrace.com/api/v2/otlphttps://<environment-id>.live.dynatrace.com/api/v2/otlpAuthorization=Api-Token <token> or Authorization=Bearer <token>Use Api-Token for an access token (dt0c01.). The metrics secret needs metrics.ingest; the events secret needs logs.ingest. Use Bearer for a platform token (dt0s16.). The metrics secret needs openpipeline:metrics:ingest; the events secret needs openpipeline:logs:ingest. Before November 26, 2026, Dynatrace rejects the daily metrics as too old. See Check your platform's time window
ElasticgRPC, https://<deployment>.ingest.<region>.gcp.elastic-cloud.com:443Not covered on this pageAuthorization=ApiKey <base64>The base64 encoding of <id>:<api_key>
Amazon CloudWatchHTTP/protobuf, https://monitoring.<region>.amazonaws.com/v1/metricshttps://logs.<region>.amazonaws.comMetrics: Authorization=Bearer <api-key>. Events: Authorization=Bearer <api-key>,x-aws-log-group=<group>,x-aws-log-stream=<stream>A CloudWatch API key. Kiro can't sign requests with AWS Signature Version 4 (SigV4). For events, create the log group and log stream first, and turn on bearer token authentication for the log group
OpenSearch through Data PreppergRPC, https://<receiver-host>:21891Your otel_logs_source URLAuthorization=Basic <base64>The user of your Data Prepper source. For events, set compression: "gzip" on the source
Your own OTLP collectorgRPC on 4317, or HTTP/protobuf on 4318https://<collector-host>:4318As your collector requiresIts OTLP/HTTP receiver must accept gzip

For CloudWatch API keys, see OTLP endpoints in the Amazon CloudWatch User Guide.

Step 3: Store the secret

  1. Open the AWS Secrets Manager console in the Region of your Kiro profile, and choose Store a new secret.

  2. For Secret type, choose Other type of secret.

  3. Choose the Plaintext tab, delete the sample text, and paste the value from Step 2.

  4. For Encryption key, choose the key from Step 1. Don't choose aws/secretsmanager. Choose Next.

  5. Enter a Secret name, such as kiro/otel-metrics or kiro/otel-events.

  6. Under Resource permissions, choose Edit permissions, and paste this policy. Choose Save.

    json
    { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowKiroGetSecretValue", "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": "secretsmanager:GetSecretValue", "Resource": "*" } ] }
  7. Choose Next. Leave rotation off, and choose Next again.

  8. Choose Store.

  9. Open the secret and copy the Secret ARN. You enter it in the Kiro console.

Repeat Step 2 and Step 3 for the second export, if you use both.

Use the AWS CLI

Skip the first command if you already have the key.

bash
# 1. Create the KMS key with the Kiro decrypt statement aws kms create-key --region <region> \ --description "Kiro OpenTelemetry export" \ --policy '{"Version":"2012-10-17","Statement":[ {"Sid":"EnableRoot","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::<account-id>:root"},"Action":"kms:*","Resource":"*"}, {"Sid":"AllowKiroDecryptViaSecretsManager","Effect":"Allow","Principal":{"Service":"q.amazonaws.com"},"Action":["kms:Decrypt","kms:DescribeKey"],"Resource":"*","Condition":{"StringEquals":{"kms:ViaService":"secretsmanager.<region>.amazonaws.com"}}}]}' \ --query KeyMetadata.KeyId --output text # 2. Create the secret, encrypted with the key. Save the value from Step 2 as secret.json. aws secretsmanager create-secret --region <region> \ --name kiro/otel-events --kms-key-id <key-id> \ --secret-string file://secret.json # 3. Let Kiro read the secret aws secretsmanager put-resource-policy --region <region> \ --secret-id kiro/otel-events \ --resource-policy '{"Version":"2012-10-17","Statement":[{"Sid":"AllowKiroGetSecretValue","Effect":"Allow","Principal":{"Service":"q.amazonaws.com"},"Action":"secretsmanager:GetSecretValue","Resource":"*"}]}'

Change the endpoint or rotate the credential

Update the secret value. Keep the same secret ARN.

bash
aws secretsmanager put-secret-value --region <region> \ --secret-id kiro/otel-events --secret-string file://secret.json

Kiro uses the new value the next time it sends data. Real-time events use it at the next delivery, because Kiro doesn't cache the secret. Metrics use it at the next daily export, at 00:30 UTC (02:00 UTC before November 26, 2026).

Next step

Turn on the export in the Kiro console. If your collector is not on the public internet, set up private connectivity first.

Page updated: November 16, 2026