Amazon Bedrock model invocation logging is enabled
Bedrock model invocation logging captures request, response, and metadata for Converse, ConverseStream, InvokeModel, and InvokeModelWithResponseStream calls per Region, delivering records to CloudWatch Logs and/or S3 when configured.
Risk
Without invocation logs, you lose auditability and forensic visibility into model activity.
Credential misuse or prompt injection/jailbreak attempts may go unnoticed, enabling data exfiltration and unauthorized spend. Missing traceability weakens integrity controls and slows incident response.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks bedrock_model_invocation_logging_enabledRecommendation
Enable model invocation logging and route events to CloudWatch Logs and/or S3.
Enforce least privilege on log access, use encryption, and set retention/lifecycle policies. Monitor for anomalies and alerts to support defense in depth and separation of duties.
Remediation
CLI
aws bedrock put-model-invocation-logging-configuration --logging-config '{"s3Config":{"bucketName":"<example_resource_name>"},"textDataDeliveryEnabled":true}'Other
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.bedrock.bedrock_client import bedrock_client
class bedrock_model_invocation_logging_enabled(Check):
def execute(self):
findings = []
for region, logging in bedrock_client.logging_configurations.items():
report = Check_Report_AWS(metadata=self.metadata(), resource=logging)
report.region = region
report.resource_id = "model-invocation-logging"
report.resource_arn = (
bedrock_client._get_model_invocation_logging_arn_template(region)
)
report.status = "FAIL"
report.status_extended = "Bedrock Model Invocation Logging is disabled."
if logging.enabled:
report.status = "PASS"
report.status_extended = "Bedrock Model Invocation Logging is enabled"
if logging.cloudwatch_log_group and logging.s3_bucket:
report.status_extended += f" in CloudWatch Log Group: {logging.cloudwatch_log_group} and S3 Bucket: {logging.s3_bucket}."
elif logging.cloudwatch_log_group:
report.status_extended += (
f" in CloudWatch Log Group: {logging.cloudwatch_log_group}."
)
elif logging.s3_bucket:
report.status_extended += f" in S3 Bucket: {logging.s3_bucket}."
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html#model-invocation-logging-console
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/Bedrock/enable-model-invocation-logging.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html