Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions content/en/serverless/aws_lambda/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- [Visualize and model AWS services correctly](#visualize-and-model-aws-services-by-resource-name)
- [Send logs to Observability Pipelines](#send-logs-to-observability-pipelines)
- [Reload API key secret periodically](#reload-api-key-secret-periodically)
- [Store API key in AWS Secrets Manager](#store-api-key-in-aws-secrets-manager)
- [Troubleshoot](#troubleshoot)
- [Further Reading](#further-reading)

Expand Down Expand Up @@ -799,6 +800,18 @@

This is available for version 88+ of the Datadog Lambda Extension.

## Store API key in AWS Secrets Manager

Check warning on line 803 in content/en/serverless/aws_lambda/configuration.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.headings

'Store API key in AWS Secrets Manager' should use sentence-style capitalization.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this section go before "Reload API key secret periodically"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Store API key in AWS Secrets Manager
## Store the API key in AWS Secrets Manager


`DD_API_KEY_SECRET_ARN` specifies the ARN of an AWS Secrets Manager secret that stores your Datadog API key. When set, the Datadog Lambda Extension fetches the secret at cold start and uses its value as the API key. The Lambda function's execution role must be granted secretsmanager:GetSecretValue permission on the referenced ARN.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`DD_API_KEY_SECRET_ARN` specifies the ARN of an AWS Secrets Manager secret that stores your Datadog API key. When set, the Datadog Lambda Extension fetches the secret at cold start and uses its value as the API key. The Lambda function's execution role must be granted secretsmanager:GetSecretValue permission on the referenced ARN.
`DD_API_KEY_SECRET_ARN` specifies the ARN of an AWS Secrets Manager secret that stores your Datadog API key. When set, the Datadog Lambda Extension fetches the secret at cold start and uses its value as the API key. Grant the Lambda function's execution role `secretsmanager:GetSecretValue` permission on the referenced ARN.


Starting v96, the secret value can be stored in either of two formats:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Starting v96, the secret value can be stored in either of two formats:
Starting with version 96, you can store the secret value in one of the following formats:

- Plain string: the secret value is used directly as the API key.
- JSON object: if the secret value parses as a JSON object containing a `dd_api_key` field, the value of that field is extracted and used as the API key. This is convenient when the same secret stores multiple credentials (for example, alongside an app key or other tokens).
Comment on lines +808 to +809
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Plain string: the secret value is used directly as the API key.
- JSON object: if the secret value parses as a JSON object containing a `dd_api_key` field, the value of that field is extracted and used as the API key. This is convenient when the same secret stores multiple credentials (for example, alongside an app key or other tokens).
- **Plain string**: The extension uses the secret value as the API key.
- **JSON object**: If the secret value parses as a JSON object containing a `dd_api_key` field, the extension extracts that field's value and uses it as the API key. This is useful when the same secret stores multiple credentials (for example, alongside an app key or other tokens).

```sh
{ "dd_api_key": "<YOUR_DATADOG_API_KEY>" }
```
Comment on lines +810 to +812
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is json correct? If not, spell out shell instead of sh

Suggested change
```sh
{ "dd_api_key": "<YOUR_DATADOG_API_KEY>" }
```
```json
{ "dd_api_key": "<YOUR_DATADOG_API_KEY>" }
```

Attention: If the JSON object does not contain a `dd_api_key` field, or the value is not valid JSON, the extension falls back to using the raw secret string. The JSON key name is fixed as dd_api_key and is not configurable.

Check notice on line 813 in content/en/serverless/aws_lambda/configuration.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Attention: If the JSON object does not contain a `dd_api_key` field, or the value is not valid JSON, the extension falls back to using the raw secret string. The JSON key name is fixed as dd_api_key and is not configurable.
**Note**: If the JSON object does not contain a `dd_api_key` field, or the value is not valid JSON, the extension falls back to using the raw secret string. The JSON key name is fixed as `dd_api_key` and is not configurable.


## Troubleshoot

If you have trouble configuring your installations, set the environment variable `DD_LOG_LEVEL` to `debug` for debugging logs. For additional troubleshooting tips, see the [serverless monitoring troubleshooting guide][39].
Expand Down
Loading