Turning on Amazon Bedrock Model Invocation Logging solves auditability until your security team inspects the target S3 bucket or CloudWatch log group. Bedrock writes the raw request and response payloads as received, which means any customer email, SSN, credit card, or AWS access key passed in a prompt or tool output gets persisted to S3 and indexed in CloudWatch Logs.
At the same time, agent runtimes running on EKS or EC2 behind Bedrock AgentCore often ship with two quieter IAM gaps: EC2 instances still allow IMDSv1 (http_tokens = optional) or HttpPutResponseHopLimit > 1, and the S3 bucket holding invocation logs has an overly permissive bucket policy or KMS key policy.
1. Scrub Payloads Before InvokeModel or Converse
Amazon Bedrock logs the payload your application sends to the API, so redaction has to run before InvokeModel or Converse is called. If you run PII redaction inside your VPC (or through a zero-retention gateway) with deterministic placeholders, invocation logs only ever store tokens like [EMAIL_1] and [AWS_KEY_1].
Using CoreNova AI Guard, you can redact both user prompts and MCP tool responses in under 15ms while keeping deterministic placeholders across turns:
curl -s -X POST https://guard.corenovacloud.com/v1/redact \ -H "Content-Type: application/json" \ -d '{ "text": "Customer alice@acme.com hit key AKIAIOSFODNN7EXAMPLE on card 4111111111111111", "return_restoration_map": true }' When an agent invokes downstream tools, McpToolResponseGuard from CoreNovaLabs/ai-guard-mcp-starter keeps allow_unscoped_fields=False by default so real values are only restored for explicitly allowlisted tools and argument keys:
from mcp_tool_response_proxy import McpToolResponseGuard guard = McpToolResponseGuard( trusted_tools={"send_receipt": {"to", "cc"}}, on_untrusted_restore="raise", ) safe_payload = guard.sanitize_tool_result("crm_lookup", raw_tool_output) Because safe_payload is scrubbed before it enters the Bedrock message history, neither the foundation model nor Bedrock Invocation Logging ever sees the raw secret.
2. Gate IMDSv1, Bedrock Cost Exposure, and Log Bucket Policies in CI
Before deploying agent infrastructure, run CoreNova Cloud Audit v1.4.0 (POST /v1/scan/iac, POST /v1/scan/iam, and POST /v1/scan/s3-access) in your PR pipeline:
-
IAC_IMDSV1_ENABLED: flags Terraform/CloudFormation launch templates wherehttp_tokensis omitted or set tooptional, blocking SSRF-based IAM credential theft from agent pods. -
IAM_BEDROCK_UNSCOPED_INVOKEandIAM_BEDROCK_COST_COMMITMENT: catchbedrock:InvokeModel*onResource: "*"and unrestrictedbedrock:CreateProvisionedModelThroughputbefore merge. -
S3_PUBLIC_POLICY_READandKMS_WILDCARD_PRINCIPAL_DECRYPT: verify who can actually read your Bedrock invocation log bucket across bucket policy, KMS key policy, SCPs, andsts:AssumeRoletrust chains.
Test an IAM or Terraform snippet directly against the zero-retention sandbox:
curl -s -X POST https://audit.corenovacloud.com/v1/scan/iam \ -H "Content-Type: application/json" \ -d '{"policy":{"Statement":[{"Effect":"Allow","Action":["bedrock:InvokeModel*"],"Resource":"*"}]}}' 3. Sandbox vs. In-VPC Zero-Egress Deployment
- 3-second browser and curl sandboxes (zero payload logging): Test PII redaction and MCP tool inspection at guard.corenovacloud.com and IAM/IaC/S3-KMS scans at audit.corenovacloud.com.
- In-VPC Zero-Egress Container ($99/mo or $899/yr on AWS Marketplace): Deploy CoreNova AI Guard MCP Server inside your own EKS, ECS Fargate, or AgentCore VPC so prompts and logs never leave your AWS account.
- Serverless SaaS + Remote MCP ($29 Starter / $99 Team / $299 Business on AWS Marketplace): Subscribe on your consolidated AWS bill from the CoreNova AWS Marketplace seller profile using CoreNovaLabs/ai-guard-mcp-starter and CoreNovaLabs/cloud-audit-mcp-starter.


