Back to Checks
Prowlerprowler-provider-aws
IAM role does not have AmazonBedrockFullAccess managed policy attached
bedrock_full_access_policy_attached
Service: bedrockSeverity: high
OfficialBuilt-inVerified
Categories:gen-aiidentity-access
Resource Type:AwsIamRole
IAM roles (excluding service roles) are evaluated for attachment of the AWS-managed AmazonBedrockFullAccess policy.
This policy grants unrestricted access to all Amazon Bedrock actions and resources.
Risk
The AmazonBedrockFullAccess policy grants broad permissions across all Bedrock resources. If a role with this policy is compromised, an attacker could:
- Invoke any model to exfiltrate data or generate harmful content
- Modify guardrails, logging, and security configurations
- Incur significant costs through unrestricted model invocations
Run this check with Prowler
Run in Prowler CloudRun
prowler aws --checks bedrock_full_access_policy_attachedRecommendation
Apply least privilege: replace AmazonBedrockFullAccess with a custom policy granting only the specific Bedrock actions required.
Use permissions boundaries and SCPs to limit the scope of Bedrock permissions. Regularly review access with IAM Access Analyzer to identify and remove unused privileges.
Remediation
CLI
aws iam detach-role-policy --role-name <ROLE_NAME> --policy-arn arn:aws:iam::aws:policy/AmazonBedrockFullAccessTerraform
# IAM Role without AmazonBedrockFullAccess
resource "aws_iam_role" "<example_resource_name>" {
assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {"Service": "ec2.amazonaws.com"},
"Action": "sts:AssumeRole"
}]
}
POLICY
managed_policy_arns = [] # Critical: ensures AmazonBedrockFullAccess is NOT attached
}NativeIaC
# CloudFormation: IAM Role without AmazonBedrockFullAccess
Resources:
<example_resource_name>:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: ec2.amazonaws.com
Action: sts:AssumeRole
ManagedPolicyArns: [] # Critical: ensure AmazonBedrockFullAccess is NOT attachedOther
1Open the AWS Console and go to IAM > Roles
2Select the role flagged by the check
3On the Permissions tab, find "AmazonBedrockFullAccess" under Attached policies
4Click Detach next to "AmazonBedrockFullAccess"
5Confirm the detach
6Attach a scoped policy granting only required Bedrock actions
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.iam.iam_client import iam_client
class bedrock_full_access_policy_attached(Check):
"""Ensure that IAM roles do not have the AmazonBedrockFullAccess managed policy attached.
This check evaluates whether IAM roles (excluding service roles) have the
AmazonBedrockFullAccess AWS-managed policy attached, which grants excessive
permissions and violates the principle of least privilege.
- PASS: The IAM role does not have the AmazonBedrockFullAccess policy attached.
- FAIL: The IAM role has the AmazonBedrockFullAccess policy attached.
"""
def execute(self) -> list[Check_Report_AWS]:
"""Execute the check logic.
Returns:
A list of reports containing the result of the check.
"""
findings = []
if iam_client.roles:
for role in iam_client.roles:
if not role.is_service_role:
report = Check_Report_AWS(metadata=self.metadata(), resource=role)
report.region = iam_client.region
report.status = "PASS"
report.status_extended = f"IAM Role {role.name} does not have AmazonBedrockFullAccess policy attached."
for policy in role.attached_policies:
if (
policy["PolicyArn"]
== "arn:aws:iam::aws:policy/AmazonBedrockFullAccess"
):
report.status = "FAIL"
report.status_extended = f"IAM Role {role.name} has AmazonBedrockFullAccess policy attached."
break
findings.append(report)
return findings