Check provider logo

Amazon Bedrock API key is expired

bedrock_api_key_no_long_term_credentials

Severityhigh
Servicebedrock
by Prowler

Bedrock API keys are evaluated for lifetime and expiration.

The finding identifies keys that are long-lived, set to expire far in the future, or configured to never expire, and distinguishes them from keys that have already expired.

Risk

Long-lived or non-expiring keys enable persistent access if compromised.

  • Confidentiality: unauthorized inference and exposure of prompts/outputs
  • Availability/Cost: uncontrolled usage and spend spikes
  • Integrity: actions can continue without timely revocation or rotation
Run this check with Prowler CLI

prowler aws --checks bedrock_api_key_no_long_term_credentials

Recommendation

Prefer short-term credentials and IAM roles; avoid never expire.

Enforce least privilege, strict rotation, and automatic expiration for any long-term key. Store secrets securely, monitor with audit logs, and revoke unused or stale keys quickly.

Remediation

CLI

aws iam delete-service-specific-credential --user-name <username> --service-specific-credential-id <credential-id>

Other
  1. Sign in to the AWS Management Console and open IAM
  2. Go to Users > select <example_resource_name> > Security credentials
  3. In "API keys for Amazon Bedrock", find the non-expired key and click Delete
  4. Confirm deletion to remove the key (removes the long-term credential so the check passes)

Source Code

Resource Type

AwsIamUser

References