CLOUD CONCEPT

Data Loss Prevention

Data Loss Prevention is the use of policies and controls to detect sensitive information and prevent its unauthorized disclosure, transfer, or use.

Cloud Concepts Hub →

What is Data Loss Prevention

Data Loss Prevention combines data classification, inspection, access restrictions, and enforcement at the points where information is stored, processed, or transmitted. In cloud and generative AI applications, it helps prevent confidential records, credentials, and proprietary content from escaping through prompts, retrieved context, model responses, logs, or external tools.

Data Loss Prevention, commonly abbreviated DLP, protects sensitive information from leaving its permitted boundaries. Those boundaries may be a tenant, application, organization, geographic region, or approved set of recipients. A practical DLP policy identifies the data being protected, who may use it, which destinations are allowed, and what happens when a violation is detected. Depending on the situation, enforcement can block a request, redact selected fields, quarantine an object, or alert an investigator.

Start with discovery and classification. Engineers need to locate personal information, payment data, credentials, confidential documents, and other protected content across object storage, databases, application payloads, and telemetry. Detection may use predefined identifiers, custom patterns, checksums, or contextual analysis. Classification labels and resource tags help express policy, but tags alone do not inspect content or prevent disclosure. Likewise, discovering sensitive files does not automatically stop their download or transmission.

In cloud workloads, apply complementary controls around storage, identities, application interfaces, and outbound traffic. Restrict access to sensitive datasets, prevent unintended public access, and permit transfers only to approved destinations. Inspect relevant content at application boundaries where it is available in plaintext. Encryption protects information against interception or unauthorized storage access, but it does not prevent an authorized application from decrypting information and sending it to an inappropriate recipient. Network destination restrictions reduce exfiltration opportunities without necessarily recognizing sensitive content.

Generative AI applications introduce additional disclosure paths. Users can submit sensitive material in prompts, retrieval-augmented generation can insert confidential documents into model context, and an agent can send information to external tools. Model responses, conversation histories, caches, traces, and invocation logs can also become secondary copies of protected data. Minimize the information supplied to the model, tokenize or redact fields where practical, and inspect both inputs and outputs. Keep credentials outside prompts and system instructions; a system prompt is not a secure secret store.

For example, a customer-support assistant might need an order status but not a customer's complete payment details. Authorize the user's access before retrieving order records, select only necessary fields, and inspect the assembled request before model invocation. Inspect the response before releasing it, and redact sensitive values from logs separately. If the assistant can call an external ticketing tool, validate the tool destination and payload in application code. A model-generated tool call must not be treated as proof that the transfer is authorized.

These controls address the OWASP risk of sensitive information disclosure and complement protections against prompt injection and excessive agency. Treat retrieved documents and tool results as untrusted data rather than instructions. Enforce tenant isolation and document-level authorization outside the model, and restrict agent permissions to the actions required for the task. Content guardrails can reduce disclosure risk, but they do not establish authorization or reliably defeat every injection attempt. Do not assume output filtering can undo information already transmitted to a model or tool.

DLP introduces trade-offs in latency, cost, accuracy, and usability. Pattern matching can flag harmless text or miss encoded, fragmented, multilingual, or context-dependent disclosures. Streaming responses require particular care because sensitive content released before inspection cannot be recalled. Test policies with realistic data and adversarial prompts, measure false positives and false negatives, and define what happens when inspection fails or times out. High-risk transfers may require blocking when inspection is unavailable. Keep exception approvals auditable, restrict access to findings, and avoid retaining raw sensitive payloads merely to investigate a DLP event.

Key aspects of Data Loss Prevention

Effective DLP combines classification, inspection, authorization, enforcement, and continuous testing across every meaningful disclosure path.

Sensitive-data discovery and classification

Identify protected information across storage and application data flows using managed detectors, custom patterns, and contextual checks. Use the resulting classifications to determine permitted access, processing, and destinations.

Inspection at disclosure boundaries

Inspect content before model invocation, external tool execution, and response delivery. Cover logs, caches, and traces separately so that a protected response does not leave an unprotected secondary copy.

Policy-based enforcement

Choose blocking, masking, quarantine, or alerting according to the sensitivity and transfer context. Define explicit behavior for inspection errors and approved exceptions rather than silently allowing unchecked transfers.

Data minimization and authorization

Retrieve and transmit only the fields necessary for the task, with authorization enforced before data enters model context. Apply tenant and document-level access checks outside the model.

Generative AI defense in depth

Combine sensitive-information filters with prompt-injection defenses, restricted agent permissions, and validated tool payloads. Treat model outputs as untrusted proposals, not authorization decisions.

Continuous validation and safe evidence handling

Test detectors against realistic disclosure attempts and track false positives, false negatives, and inspection failures. Protect findings and investigation records because they can themselves contain sensitive information.

Cloud services for Data Loss Prevention

Use Macie to discover sensitive S3 data and prioritize remediation, then apply IAM permissions to constrain access by applications and agents. Integrate Bedrock Guardrails into model input and response processing, while enforcing retrieval authorization and tool payload checks in application code. Route relevant workload egress through Network Firewall to restrict destinations. Minimize sensitive logging at the source and use CloudWatch Logs data protection for supported detection and masking in logs. Together, these services address different disclosure paths; none alone provides end-to-end DLP or guarantees that an authorized application cannot disclose information.

Amazon Bedrock

Amazon Bedrock Guardrails provides sensitive-information filters that can block or mask supported personal information types and matches to custom regular expressions in evaluated inputs and responses. Applications must explicitly integrate guardrail evaluation into the relevant paths; these filters do not replace retrieval authorization, tool validation, or separate log protection.

Open Amazon Bedrock →
Amazon Macie image Amazon Macie

Amazon Macie discovers sensitive data in supported Amazon S3 objects using managed and custom data identifiers and produces findings for investigation or automation. It is a discovery and monitoring service, not an inline control that automatically blocks object downloads or model requests.

Open Amazon Macie →
AWS Firewall Manager image AWS Network Firewall

AWS Network Firewall can restrict traffic through supported network and domain-based rules when workload traffic is routed through its endpoints. It helps reduce unauthorized outbound destinations but is not a general-purpose sensitive-data classifier, and encrypted traffic limits visibility unless appropriate inspection is configured.

Open AWS Network Firewall →
Amazon CloudWatch image Amazon CloudWatch

CloudWatch Logs data protection policies can audit supported sensitive-data identifiers and mask matching values in supported log views for users without unmask permissions. This protects log consumption rather than removing the original sensitive data, so application-side log minimization remains necessary.

Open Amazon CloudWatch →