Control permissions for generating and using Amazon Bedrock API keys - Amazon Bedrock

Control permissions for generating and using Amazon Bedrock API keys

The following IAM actions control the generation and use of Amazon Bedrock API keys:

You can attach the following policy to an IAM identity to prevent it from both generating and using Amazon Bedrock API keys:

{ "Version": "2012-10-17", "Statement": [ { "Sid":"DenyBedrockShortAndLongTermAPIKeys", "Effect": "Deny", "Action": [ "iam:CreateServiceSpecificCredential", "bedrock:CallWithBearerToken" ], "Resource": [ "*" ] } ] }
Warning

This policy will prevent the creation of credentials for all AWS services that support creating service-specific credentials. For more information, see Service-specific credentials for IAM users.