Limit Amazon Bedrock long-term API keys to under 30 days
Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.
Limit Amazon Bedrock long-term API keys to under 30 days is an AWS guardrail written in service control policies. Denies iam:CreateServiceSpecificCredential for Bedrock when the credential age is 30 days or more. What it breaks: creating a Bedrock long-term API key with a validity of 30 days or longer fails for every principal in the affected accounts.
More ai services guardrails ยท About Service control policies
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "iam:CreateServiceSpecificCredential",
"Resource": "*",
"Condition": {
"StringEquals": {
"iam:ServiceSpecificCredentialServiceName": "bedrock.amazonaws.com"
},
"NumericGreaterThanEquals": {
"iam:ServiceSpecificCredentialAgeDays": "30"
}
}
}
]
}
- Blocks
- Denies iam:CreateServiceSpecificCredential for Bedrock when the credential age is 30 days or more.
- Breaks
- Creating a Bedrock long-term API key with a validity of 30 days or longer fails for every principal in the affected accounts. (source)
- Test before applying
- As for every Service control policies guardrail: how to test before enforcing
- Mechanism
- Service control policies (SCPs): IAM users, IAM roles and the root user in member accounts; not the management account and not service-linked roles.
- Taken from
- open source set, MIT-0 (README states MIT-0; LICENSE file fetched, MIT-0 text, Copyright Amazon.com, Inc.): https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/LICENSE
What the policy text names
It names 1 action or pattern: iam:CreateServiceSpecificCredential. Its conditions test iam:ServiceSpecificCredentialServiceName.
What the source says
"iam:ServiceSpecificCredentialAgeDays: 30" (read 10 Nov 2026).
On what it breaks: "that are valid for longer than 30 days."
Related guardrails
- Configure Cognitive Services accounts to disable public network accessAzure, Azure Policy (built-in definitions), ai services
- Configure Cognitive Services accounts to disable local authenticationAzure, Azure Policy (built-in definitions), ai services
- Configure Azure AI Services resources to disable local key accessAzure, Azure Policy (built-in definitions), ai services
- Region deny that allows Bedrock cross-Region inferenceAWS, Service control policies (SCPs), ai services
- Allow only approved Amazon Bedrock modelsAWS, Service control policies (SCPs), ai services
- Deny Amazon Bedrock API keysAWS, Service control policies (SCPs), ai services
Related pages
Sources
- Limit Amazon Bedrock long-term API keys to under 30 days, read 10 Nov 2026
- What it breaks, read 10 Nov 2026
- How to test it first, read 10 Nov 2026
Last reviewed 16 Nov 2026.