AWS Certified Generative AI Developer - Professional: Security: KMS, data masking, PII protection
FULL TRANSCRIPT
Security KMS data masking PII
protection. This is the day where AWS
checks something very simple and very
serious. Is your Genai system safe to
deploy in the real world? Not probably
secure, not we'll fix it later, but
secure enough to survive an audit.
Imagine this. A national healthare
agency builds an AI assistant. It
summarizes patient notes. It answers
internal questions. It helps staff find
procedures quickly. Then one mistake
happens. Raw patient data is logged. PII
appears in prompts. Encryption keys are
misused. The result isn't a warning.
It's legal penalties, system shutdowns,
and people losing their jobs. AWS wants
to know one thing. Would your design
survive that moment?
Let's start with the foundation. KMS.
AWS key management service exists to
control who can encrypt and decrypt
data. KMS does not store your data. It
enforces trust boundaries around it.
Anywhere your geni system stores data,
KMS should be involved. Documents in S3,
embeddings in open search, cache and
dynamob, secrets and secrets manager,
logs and cloudatch. If data is stored,
it should be encrypted with KMS. That's
not optional in regulated systems.
Here's the exam level truth about KMS.
Customer managed keys give you control.
Key policies and IM policies both
matter. Lease privilege applies to
encryption too and key rotation should
be enabled where possible. The common
trap is assuming encryption is
automatic. AWS expects you to explicitly
design for KMS, not assume it. Security
doesn't stop at storage. Data and
transit matters just as much. Client to
API gateway, application to bedrock,
application to open search, application
to Lambda tools. Every hop should be
encrypted with TLS. And if the exam says
no public internet, private
connectivity, compliance requirements,
the answer includes VPC endpoints,
notnet gateways, and hope. Now, let's
talk about the real danger. PII leaks
don't usually happen because of
attackers. They happen because of design
mistakes, logging raw prompts, passing
full identities into LLMs unnecessarily,
storing unmasked chat history, embedding
sensitive data permanently, returning
personal information and outputs. These
are the failures AWS loves to test. The
fix is data masking. Data masking means
removing or opuscating sensitive fields
before they reach unsafe places. Names
become placeholders. IDs are partially
hidden. Addresses are removed. The model
still works. The risk disappears. And
here's the critical part. Masking must
happen before. Prompting the model,
logging requests, and storing long-term
memory. You never rely on the model to
behave. Temperature is not a security
control. Prompts are not a security
control. Masking is. Consider this.
Instead of sending John Smith, born
1983, has condition X, you send patient
ded has condition X. The assistant still
summarizes correctly, but no personal
data is exposed. That's real security.
PII protection in Geni systems follows
four rules. First, minimize data. Only
send what the model actually needs. AWS
calls this data minimization. Second,
detect sensitive data. Use rules,
patterns, or classifiers before
prompting, logging, or storing. Third,
separate identity from content. Store
identifiers securely. Send content
without identity to the model. Fourth,
use guard rails to prevent unsafe
output. Guardrails stop bad responses.
They do not encrypt data. Different
tools, different jobs.
Memory deserves special attention.
Storing full conversations with PII and
embeddings is dangerous. Embeddings are
hard to delete and hard to audit. The
correct pattern is simple. Mask before
embedding. Store references separately.
Apply retention limits. AWS exams love
the phrase avoid storing sensitive data
in embeddings because it shows you
understand permanence. Now think about
audits. AWS expects you to mention
encrypted logs, restricted access, audit
trails, retention policies, cloudatch
logs, encrypted with KMS, cloud trail
tracking, key usage, IM access analyzer
to catch overreach. This is how systems
pass reviews. There are classic exam
traps here. Using prompts to ask the
model not to leak data, lowering
temperature for security, encrypting
only production data, storing everything
and cleaning later. All of these fail
audits. Security must be enforced before
the model sees the data. Here's the
mental map you should always carry. User
input enters. PII is detected and
masked. Prompts are constructed safely.
The model is invoked. Guard rails check
outputs. Logs are written without PII
and encrypted with KMS. That flow alone
answers most security questions. Lock
this sentence into memory. Mask before
prompting. Encrypt before storing. Log
without PII. If you remember that, day
26 is solved. Final self- test. A Genai
system logs full prompts including
customer names and IDs. What is the
correct fix? Apply data masking before
logging and encrypt logs using KMS.
That's not just an exam answer. That's
how you keep the system alive.
UNLOCK MORE
Sign up free to access premium features
INTERACTIVE VIEWER
Watch the video with synced subtitles, adjustable overlay, and full playback control.
AI SUMMARY
Get an instant AI-generated summary of the video content, key points, and takeaways.
TRANSLATE
Translate the transcript to 100+ languages with one click. Download in any format.
MIND MAP
Visualize the transcript as an interactive mind map. Understand structure at a glance.
CHAT WITH TRANSCRIPT
Ask questions about the video content. Get answers powered by AI directly from the transcript.
GET MORE FROM YOUR TRANSCRIPTS
Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.