Cloud concept · Updated

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.

In short

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.

Cloud Concepts Hub →

6 key aspects of Data Loss Prevention

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

01
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.

02
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.

03
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.

04
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.

05
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.

06
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.

Amazon MacieAmazon 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.

AWS Network FirewallAWS 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.

Amazon CloudWatchAmazon 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.

Data Loss Prevention exam questions

Real practice exam questions on Data Loss Prevention, with the correct answer and its explanation. Answer them with every option in the exam simulator.

MLA-C02 (beta)

A healthcare company receives CSV files in an Amazon S3 staging bucket for a weekly ML training pipeline. The files can contain Social Security numbers and internal patient identifiers that follow a documented pattern and appear near the keyword "patient_ref". Company policy prohibits training on files containing either identifier. The training role can read only a separate approved-data bucket. The company wants managed sensitive-data discovery without developing a custom text-processing application. Which solution best meets these requirements?

Show answerCORRECT ANSWER

Run Amazon Macie sensitive data discovery jobs over all incoming files, using a managed identifier for Social Security numbers and a custom identifier with the patient identifier pattern and contextual keyword. Keep files in staging until analysis completes successfully, and use an approval workflow to copy only files without prohibited-data findings to the approved-data bucket.

Macie discovers sensitive data in S3 using managed and custom data identifiers. The custom identifier can combine the company's pattern with a nearby keyword. Keeping files inaccessible to training until successful analysis and approval provides enforcement; Macie findings alone do not block access or move objects. Files that cannot be analyzed should remain unapproved.

AIP-C01

A company operates several applications that invoke Amazon Bedrock foundation models by using a shared application IAM role. An approved Bedrock guardrail has tested sensitive-information policies that anonymize configured customer identifiers in prompts and responses. However, developers can currently omit the guardrail parameters when invoking a model.

The applications use InvokeModel, InvokeModelWithResponseStream, Converse, and ConverseStream. Existing identity policies grant the role inference access to the approved models. The security team requires an additional preventive control that rejects inference requests unless they specify the approved guardrail. The control must remain effective even if another identity policy grants unrestricted inference access. Application developers cannot modify the security team's IAM policies or assume other roles.

Which implementation meets these requirements?

Show answerCORRECT ANSWER

Add explicit Deny statements to the application role for bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream when bedrock:GuardrailIdentifier is absent or does not equal the approved guardrail ARN.

An explicit deny overrides allows in other identity policies. The bedrock:GuardrailIdentifier condition key can enforce attachment of the approved guardrail to inference requests. InvokeModel permissions also govern Converse, and InvokeModelWithResponseStream permissions also govern ConverseStream, so these denies cover all four invocation paths.

SCS-C03

A manufacturer uses an Amazon SageMaker AI real-time endpoint to summarize confidential engineering documents. The model must receive the complete documents to produce useful summaries. The endpoint has data capture enabled for requests and responses, and the application also writes request and response bodies to diagnostic logs.

A security review finds confidential document text in both telemetry destinations. Company policy permits processing this text during inference but prohibits storing it in inference-monitoring data or diagnostic logs. Operations engineers must retain request correlation IDs, latency measurements, response status codes, and token counts. They do not require document text or generated summaries.

Which change meets these requirements?

Show answerCORRECT ANSWER

Disable endpoint request and response data capture. Replace application body logging with an allowlist-based telemetry record containing only the required operational fields, and ensure error-handling paths do not log payloads.

This prevents confidential payloads from being persisted through either identified telemetry path while preserving the operational information engineers need. The complete documents can still be sent to the model for inference. Applying the same restriction to error paths prevents exceptions or debugging logic from bypassing the control.

Practice Data Loss Prevention in a full exam

Questions on Data Loss Prevention in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Data Loss Prevention

3 min read

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.

Learn Data Loss Prevention in lessons

4 short lessons on Data Loss Prevention in 4 certification courses.

Open the lessons