---
title: Bedrock long-term API keys should be rotated every 90 days or less
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > Bedrock long-term API keys should be
  rotated every 90 days or less
---

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

# Bedrock long-term API keys should be rotated every 90 days or less
 
## Description{% #description %}

Amazon Bedrock long-term API keys are IAM service-specific credentials for the `bedrock.amazonaws.com` service. They are static bearer credentials, so a leaked key stays usable until it expires or is deactivated. Every active Bedrock API key should have an expiration date and be no more than 90 days old. The rule fails an active key that has no expiration date or was created more than 90 days ago, and skips keys that are `Inactive` or `Expired` and credentials for other services.

## Remediation{% #remediation %}

1. Create a replacement key with an expiration of 90 days or less, for example: `aws iam create-service-specific-credential --user-name <USER> --service-name bedrock.amazonaws.com --credential-age-days 90`
1. Move applications to the new key.
1. Deactivate and delete the old key.

Prefer short-term Bedrock API keys or IAM role credentials where possible. For more information, see [Generate Amazon Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html) in the Amazon Bedrock User Guide.

## References{% #references %}

- [Generate Amazon Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html)
- [CIS Amazon Web Services Benchmarks](https://www.cisecurity.org/benchmark/amazon_web_services)
