Bedrock long-term API keys should be rotated every 90 days or less

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

  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
  2. Move applications to the new key.
  3. 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 in the Amazon Bedrock User Guide.

References