Protecting Secrets, Confidential Data, and Cryptographic Key Material
Protecting secrets and key material on AWS means controlling who holds a credential or cryptographic key, how it changes, and where it physically lives: AWS Secrets Manager stores and rotates credentials, AWS KMS and its key stores hold key material at the custody level you choose, AWS Private CA and ACM hold certificate keys, and data protection policies mask sensitive values in logs and messages. SCS-C03 Task 5.3 tests five skills: designing secret management and rotation; managing imported key material and external key stores; telling imported material from AWS-generated material; masking sensitive data with CloudWatch Logs and Amazon SNS data protection; and managing keys and certificates in one Region or several. In practice that means choosing the right store, understanding the four-step rotation contract well enough to diagnose a failing rotation from its symptoms, sharing and replicating secrets without breaking the KMS half, placing a requirement on the key-custody ladder, and knowing which properties of a multi-Region key or a private CA hierarchy are shared and which are not. This lesson works through each.
On this page10 sections
- Choosing custody: Secrets Manager vs Parameter Store SecureString
- Rotation at depth: managed rotators, custom Lambdas, and the four-step contract
- Rotation strategies: single user vs alternating users
- Cross-account secrets, replication, and private access
- Killing secret sprawl: hunting hardcoded credentials
- Masking sensitive data: CloudWatch Logs and SNS data protection
- The key-material custody ladder: KMS, BYOK, custom and external key stores, CloudHSM
- Imported key material: lifecycle, rotation, and how it differs from AWS-generated material
- Keys and certificates across Regions and accounts
- Troubleshooting walkthrough: the rotation that fails and the app that breaks
- Choose between Secrets Manager and Parameter Store SecureString from rotation, replication, cross-account and cost requirements
- Tell service-managed rotation, AWS-provided rotation templates, managed external secrets and custom rotation functions apart, and explain the four-step rotation contract with the API calls and permissions each step needs
- Choose single-user or alternating-users rotation, and diagnose a failing rotation from the step and the kind of failure
- Share secrets across accounts and organizations and replicate them across Regions without breaking KMS access
- Configure CloudWatch Logs data protection policies and Amazon SNS message data protection to mask, audit or block sensitive data
- Place a requirement on the key-custody ladder (AWS-generated, imported, CloudHSM key store, external key store) and manage imported material through import, rotation and expiry
- Manage multi-Region KMS keys, ACM certificates and AWS Private CA hierarchies across Regions and accounts
Choosing custody: Secrets Manager vs Parameter Store SecureString
Secrets Manager is the store for credentials that must rotate, be shared across accounts or replicate across Regions; Parameter Store SecureString is the store for encrypted configuration that changes only on deploy. Both encrypt values under KMS, both are read by IAM-authorized API calls, and both support VPC interface endpoints. They differ in what happens after storage.
| Capability | Secrets Manager | Parameter Store SecureString |
|---|---|---|
| Automatic rotation | Built in: AWS-provided templates, service-managed secrets, managed external secrets, custom rotation functions | None. You build any rotation yourself |
| Cross-account access | Resource policy on the secret + a customer managed key | Only by sharing advanced-tier parameters through AWS RAM |
| Multi-Region | Native replication with promotable read-only replicas | No native replication |
| Cost | Per-secret monthly charge plus API calls | Standard tier is free; advanced tier adds larger values and parameter policies |
| Generation | GetRandomPassword, new values generated during rotation | None |
The selection rule: if the value is a credential that must change (database passwords, API keys with a rotation mandate, anything read across accounts), it belongs in Secrets Manager. If it is encrypted configuration that changes only on deploy (a license string, a webhook URL), a standard-tier SecureString is enough and costs nothing. Both need kms:Decrypt on the encrypting key at read time: a caller can hold secretsmanager:GetSecretValue or ssm:GetParameter and still be denied by the key policy. Parameter Store advanced-tier parameter policies (such as expiration notifications) remind you to rotate; they do not rotate anything.
Rotation at depth: managed rotators, custom Lambdas, and the four-step contract
Secrets Manager rotation changes a credential on a schedule in one of four ways, and the difference is who owns the code:
| Form | What runs | Used for |
|---|---|---|
| Service-managed secret | No function in your account. The owning service (for example Amazon RDS or Amazon Redshift managing the admin/master user password in Secrets Manager) rotates it | Admin passwords of databases created with that option |
| AWS-provided rotation template | A Lambda function deployed into your account from an AWS template. AWS wrote the code; you run, network and permission it | Credentials for Amazon RDS, Aurora, Redshift, DocumentDB and similar AWS databases |
| Managed external secrets | No Lambda. Secrets Manager rotates the credential with the partner | Only third-party SaaS partners onboarded to the feature |
| Custom rotation function | Your own Lambda implementing the four-step contract | Everything else: your own applications, non-partner APIs, on-premises databases |
A function (template or custom) is invoked once per step, in order, and starts each step by calling DescribeSecret:
- createSecret generates the new value (usually with
GetRandomPassword, which has no resource-level permissions, so it needsResource: "*") and stores it withPutSecretValueas a new version labelledAWSPENDING. A function in another account, or one running under an assumed role, must pass the event'sRotationTokentoPutSecretValue; without it, rotation fails with aRotationFailedevent saying the pending version was not created by Lambda. - setSecret applies the pending value to the target, for example by changing the database password. It is the first step that connects to the database.
- testSecret signs in to the target with the
AWSPENDINGversion. If this fails, rotation stops:finishSecretnever runs andAWSCURRENTstays on the old version. - finishSecret calls
UpdateSecretVersionStageto moveAWSCURRENTto the new version; the old version getsAWSPREVIOUS.
A staging label sits on one version at a time, so moving it is always a move, never a copy. A failed rotation does not pile up pending versions: while AWSPENDING sits on a version other than AWSCURRENT, Secrets Manager treats rotation as still in progress, and later rotations fail immediately. After fixing the cause, remove the stale AWSPENDING label and rotate again. Schedules, alarms on rotation failure and making sure clients pick up new values remain your job.
Rotation strategies: single user vs alternating users
The strategy decides whether clients ever hold a password the database no longer accepts. Single-user rotation changes the password of the one user the secret describes; the old password stops working the moment setSecret changes it, so clients still holding the old value fail until they refresh. Alternating-users rotation keeps two users (the original and a clone, named with a _clone suffix) and changes the one that is not current, so the previous user's password stays valid while clients catch up.
| Single user | Alternating users | |
|---|---|---|
| Old credential after rotation | Invalid immediately | Still valid (the previous user is untouched) |
| Who changes the password | The secret's own credentials | A separate superuser (admin) secret |
| If testSecret fails | setSecret has already changed the password, so clients on the old value break | The active user was never touched, so clients keep working |
| Choose it when | Clients tolerate a brief authentication failure and re-fetch the secret; one database user is simpler | Availability during the switch matters more than having one user, and the database supports a second user plus a superuser secret |
Two operational facts about alternating users. The clone is created at the first rotation with the original user's permissions as they were then; grants added later to one user are not copied, so every permission change must be applied to both users or the application fails each time rotation switches to the other one. And when the superuser secret is an RDS-managed master user secret, the rotation function reads that superuser secret from Secrets Manager and also calls read-only RDS APIs to look up the database connection details, so it needs a network path to RDS as well as to Secrets Manager.
Cross-account secrets, replication, and private access
Sharing a secret with another account takes two grants. First, a resource policy on the secret that allows the external principal secretsmanager:GetSecretValue. Second, decrypt rights on the KMS key that encrypts it, which is why a shared secret must use a customer managed key: the default aws/secretsmanager key is an AWS managed key and cannot be used from another account. Allow the external principal kms:Decrypt (and kms:DescribeKey) in the key policy, and give the consuming role matching IAM permissions. Miss either half and the caller gets AccessDenied. To share with a whole organization whose accounts come and go, put an aws:PrincipalOrgID condition in both the secret's resource policy and the customer managed key's policy, so new accounts need no policy edit.
Multi-Region replication. Secrets Manager replicates a primary secret to other Regions one way, from the primary. What travels and what does not:
- The secret value, its resource policy and its tags replicate; rotation runs only on the primary and the new value flows to the replicas.
- The KMS key does not. Each replica is encrypted with a key in its own Region:
aws/secretsmanagerthere by default, or a customer managed key you name. A default replica therefore breaks cross-account readers even though the replicated resource policy allows them; give the replica a Regional customer managed key whose policy allows them. - Replicas are read-only. To change the value or rotate in a replica's Region (for example during a long outage of the primary Region), promote the replica first; promotion makes it a standalone secret that no longer receives updates from the old primary.
Private access. Workloads in subnets without internet routes reach the service through the com.amazonaws.<region>.secretsmanager interface VPC endpoint. You can pin reads to your network with an aws:SourceVpce or aws:SourceVpc condition in the secret's resource policy, so a stolen credential cannot read the secret from outside it.
Killing secret sprawl: hunting hardcoded credentials
A secret store only helps if the secrets are actually in it, and leaked credentials persist in more places than the file you fixed:
- Git history: a credential committed and later deleted still sits in every clone's history.
- EC2 user data: readable from the instance metadata service and through
DescribeInstanceAttribute. Removing a password from a bootstrap script changes nothing for running instances, and every older launch template version still carries the old user data. - AMIs and EBS snapshots: baked-in config files and shell history travel with every instance launched from them.
- Environment variables and container image layers: a value passed at build time stays in its layer even if a later layer unsets it.
Prevention belongs before the commit (pre-commit hooks such as the open-source git-secrets, and repository secret scanning); after that, it is forensics. Moving to Secrets Manager also improves the audit trail: CloudTrail records every GetSecretValue call (who, when, which secret) but never the secret value itself.
The remediation order matters: rotate first, then migrate. Moving a leaked credential into Secrets Manager changes where it is stored, not whether it works, and anyone who copied it still holds a valid key. Issue a new credential, store it in Secrets Manager, point applications at GetSecretValue, invalidate the old credential, then scrub the artifacts: user data, old launch template versions, images, repository history. Containment and forensics belong to Domain 2.
Masking sensitive data: CloudWatch Logs and SNS data protection
Masking hides sensitive values from people and systems that should not see them while keeping the rest of the record usable; encryption alone does not do this, because anyone allowed to decrypt sees the raw value. Skill 5.3.4 names two managed masking controls. (Finding sensitive data in S3 with Amazon Macie is a detection skill covered in the Task 1.1 monitoring lesson, and organization data-perimeter conditions belong to the authorization lessons in Domains 4 and 6.)
CloudWatch Logs data protection policies
A data protection policy has an audit statement (report matches, optionally to CloudWatch Logs, Amazon S3 or Firehose) and a deidentify statement (mask matches). Both reference data identifiers:
- Managed data identifiers cover common types such as credit card numbers, email addresses and credentials. You select them; you cannot edit their patterns.
- Custom data identifiers cover your own formats. Each has a name and a regular expression and is referenced by name in the audit and deidentify statements, like a managed one.
Policies exist at two levels. An account-level policy applies to every log group in the account, including groups created later; a log-group policy applies to one group. When both exist, both apply to that group, so scope follows placement: the account policy is for identifiers that matter everywhere, and a log-group policy is for identifiers that matter in one place. Masking happens at ingestion and is not retroactive; a policy affects only events that arrive after it exists. Principals with logs:Unmask can view the original values, which makes unmasking an authorized, auditable exception.
Amazon SNS message data protection
Amazon SNS message data protection closed to new customers on 30 April 2026: accounts that already use it keep it, and AWS points new users to a pattern built on AWS Lambda and Amazon Bedrock Guardrails. It remains in the exam guide, so know how it works. A data protection policy on a topic has statements that combine a direction, a principal and an operation:
| Operation | Inbound (matches the principal calling Publish) | Outbound (matches the subscription's principal, per delivery) |
|---|---|---|
| Audit | Reports sensitive data in published messages | Reports sensitive data in deliveries |
| De-identify (mask or redact) | Accepts the message and stores it masked, so every subscriber gets the masked copy. Only a message that is entirely sensitive data is rejected with AuthorizationError | Delivers a masked copy to that subscriber only; others are unaffected |
| Deny | Rejects the publish; the publisher receives AuthorizationError | Fails that delivery; other subscribers still receive the message |
The direction decides whose traffic a statement acts on, and the operation decides what happens to it: Inbound statements act once for everyone, Outbound statements act per subscription.
The key-material custody ladder: KMS, BYOK, custom and external key stores, CloudHSM
Task 5.3's key-material skills are about who controls the material and where it physically lives, not encryption mechanics (Task 5.2). Each rung buys custody and costs operations:
| Rung | Where material lives | You gain | You carry |
|---|---|---|---|
KMS, AWS-generated (origin AWS_KMS) | KMS HSMs in AWS; material never leaves them unencrypted | Automatic rotation, multi-Region keys, no HSM operations | Trust in AWS custody |
KMS, imported material (origin EXTERNAL) | KMS HSMs in AWS, but you generated the material and keep a copy | Provenance, optional expiry, immediate removal with DeleteImportedKeyMaterial | No automatic rotation; the durability of your copy |
| CloudHSM key store | Your single-tenant AWS CloudHSM cluster, which runs in AWS data centers | Sole tenancy and direct control of the HSMs | Cluster availability (a key store needs at least two active HSMs in different Availability Zones) and manual rotation; CloudHSM takes cluster backups automatically, but HSM capacity is yours to keep running |
| External key store (XKS) | Your key manager outside AWS, reached through an XKS proxy | Material never enters AWS | Latency and availability of your proxy and key manager: every KMS call depends on them |
Only the external key store keeps material out of AWS: imported material and CloudHSM both live in AWS infrastructure. Both kinds of custom key store (CloudHSM and external) give up KMS features: no multi-Region keys, no imported material, and no automatic or on-demand rotation. With an external key store, rotation happens in the external key manager (new material behind the same external key ID), and disaster recovery across Regions means a separate external key store and KMS key in each Region, with data re-encrypted under the second Region's key. Using CloudHSM directly, outside KMS (for example SSL/TLS offload or Oracle TDE), appears only at mention level.
Imported key material: lifecycle, rotation, and how it differs from AWS-generated material
Imported key material is key material you generate outside AWS and upload into a KMS key whose origin is EXTERNAL; the key then works like any other symmetric KMS key, but its lifecycle is yours. The import flow is fixed: CreateKey with origin EXTERNAL (the key waits in PendingImport), GetParametersForImport (returns a wrapping public key and an import token, both valid for 24 hours), wrap the material with that public key in your own HSM, then ImportKeyMaterial with the token and an optional expiration date.
Lifecycle rules worth knowing:
DeleteImportedKeyMaterialor expiry removes material at once and puts the key inPendingImport. Reimporting the same material from your copy restores it; AWS cannot recover material you have lost.- Rotation is on demand only. Import new material into the same key as
NEW_KEY_MATERIAL, then callRotateKeyOnDemand. The key ID and ARN stay the same, new encryption uses the new material, and older material stays associated so old ciphertext still decrypts. (Creating a new key and repointing an alias is only needed for asymmetric, HMAC and custom key store keys.) - KMS treats the key as a whole: if any associated material expires or is deleted, the whole key goes to
PendingImportand every operation fails, including new encryption with the current material. Track the expiry of old material after a rotation. - Multi-Region keys can use imported material. Import the same material into the primary and each replica. To rotate, import the new material into the primary as
NEW_KEY_MATERIAL, import that same material into every replica asEXISTING_KEY_MATERIAL, and only then callRotateKeyOnDemandon the primary. KMS refuses the rotation until every replica holds the new material.
| AWS-generated | Imported | |
|---|---|---|
| Who creates the material | KMS | You, outside AWS |
| Automatic rotation | Yes, with a custom period of 90 to 2,560 days, plus on demand | No; on demand after importing new material |
| Expiry | Never | Optional, set at import |
| Remove material without deleting the key | Not possible (schedule key deletion, 7 to 30 days) | Immediately, with DeleteImportedKeyMaterial |
| Durability | AWS keeps it | Your copy is the only way to restore it |
| Multi-Region keys | Yes | Yes, with the same material imported into each related key |
Choose imported material only for a provenance or revocation requirement; without one, AWS-generated material is simpler and rotates itself.
Keys and certificates across Regions and accounts
Skill 5.3.5 asks how keys and certificates work when a workload spans Regions or accounts. KMS keys and private CAs are Regional resources, so cross-Region designs either replicate them or build one per Region.
Multi-Region KMS keys. A multi-Region primary key and its replicas share key material and key ID, so ciphertext from one Region decrypts in another without a cross-Region call or re-encryption. That pays off for client-side encryption (the AWS Encryption SDK, the DynamoDB encryption client) where ciphertext itself travels between Regions. Server-side services such as S3 Cross-Region Replication treat them as single-Region keys and re-encrypt on arrival anyway. Which properties are shared and which are set per Region:
| Shared by primary and replicas | Independent in each Region |
|---|---|
| Key ID and key material, key spec and usage, origin, automatic rotation | Aliases, key policy, grants, tags, description, enabled state |
So an alias created in one Region does not exist in another, and a replica created without a key policy gets the default key policy: application roles must be added to each replica's policy. A single-Region key can never be converted into a multi-Region key; to make existing data decryptable elsewhere, create a new multi-Region key and re-encrypt under it.
ACM certificates and private keys. A standard ACM certificate's private key is never exportable: ACM deploys it to integrated services (Elastic Load Balancing, CloudFront, API Gateway), and you cannot load it onto an EC2 server by ARN. The exception is ACM for Nitro Enclaves, which lets NGINX or Apache on EC2 use an ACM certificate while the private key stays inside the enclave. When the private key must sit on the server itself, use an exportable ACM public certificate (available since 2025, at extra charge) or a certificate issued by AWS Private CA; either way the private key's custody becomes yours. Private CA certificates are trusted only by clients you configure, never by public browsers. The CA's own signing key is different: AWS Private CA generates and keeps it in AWS-managed HSMs, and it is never exported.
AWS Private CA across accounts and Regions. A CA lives in one Region and one account. Share it with other accounts or the whole organization through AWS RAM; those accounts then request certificates through ACM (RequestCertificate with the shared CA), which makes them managed certificates: ACM attempts renewal 60 days before expiry whether or not the certificate is associated with an integrated service, provided ACM's service principal has been granted permission on the CA. A renewed certificate that is not attached to an integrated service must be exported and reinstalled wherever it is used. Certificates issued directly with IssueCertificate are unmanaged, so you renew and deploy them yourself. For Regional resilience, a single issuing CA is a single point of failure wherever it sits. The two documented hierarchies:
- One root, a subordinate (issuing) CA in each Region: issuance survives a Region outage and clients trust a single root; the root itself is not redundant, which matters only when you need a new subordinate CA.
- Redundant roots in several Regions: no single root to lose, but clients must trust every root.
Troubleshooting walkthrough: the rotation that fails and the app that breaks
A failing rotation is diagnosed by the step that failed and the kind of failure: a timeout means a missing network path, an access error means a policy. Work through it in order.
- Can the function reach Secrets Manager? A function in VPC subnets with no NAT and no Secrets Manager interface endpoint logs "Found credentials in environment variables" and then nothing until it times out, before
createSecretfinishes. Add the endpoint (and allow the function in its security group) or a NAT path. - Can it use the key? KMS problems fail fast, not with a timeout: an error such as "Access to KMS is not allowed" means the rotation role lacks
kms:Decryptorkms:GenerateDataKeyon a customer managed key. - Can it reach the database? If
createSecretsucceeded, the Secrets Manager endpoint,PutSecretValueand the KMS key all work. A timeout insetSecret, the first step that connects to the database, means the database security group does not allow the function's security group on the database port. For alternating users with an RDS-managed superuser secret, a stall aftercreateSecretcan also mean no path to the RDS API. - Is a stale label blocking it? After any failure, an
AWSPENDINGversion left behind makes later rotations fail immediately until you remove the label. - Cross-account function? A
RotationFailedevent saying the pending version was not created by Lambda meanscreateSecretdid not pass theRotationToken. - Why did the app break after a good rotation? Rotation changes the value in Secrets Manager, not in a client's memory: any process that read the secret once and kept it will hold a dead credential under single-user rotation. Re-fetch on authentication failure or use the AWS secret caching libraries with a short TTL; if clients cannot be changed, switch to alternating-users rotation.
The same two-grant rule explains cross-account failures: GetSecretValue denied from another account means checking the secret's resource policy and the customer managed key's policy, and for a replica, which key encrypts it in that Region.
Tip. SCS-C03 tests this task through custody and failure scenarios. Know which rotation form a secret needs (service-managed, AWS template, managed external secret or custom function) and read a failing rotation by its step and symptom: a timeout before createSecret, a timeout in setSecret, a fast KMS access error, a missing RotationToken, a stale AWSPENDING label or a client that cached the old value. Expect cross-account and replicated secrets where the KMS half is what breaks, key-custody requirements where only an external key store keeps material outside AWS, imported-material lifecycle questions about import parameters, on-demand rotation and expiry, multi-Region key properties that are shared versus per-Region, CloudWatch Logs and SNS data protection policy design, and certificate custody choices across ACM, exportable certificates and AWS Private CA hierarchies.
- Secrets Manager earns its cost with rotation, cross-account resource policies and multi-Region replication; a standard-tier Parameter Store SecureString is the free answer for encrypted configuration that never rotates.
- Four rotation forms: service-managed secrets (no function), AWS-provided templates (a Lambda in your account), managed external secrets (onboarded SaaS partners only, no Lambda) and custom four-step functions for everything else.
- createSecret stores AWSPENDING, setSecret changes the target, testSecret signs in with AWSPENDING, finishSecret moves AWSCURRENT with UpdateSecretVersionStage; a stale AWSPENDING blocks later rotations until removed.
- Single-user rotation invalidates the old password at once; alternating users keeps the previous user valid, but every later grant must go to both users.
- Cross-account secrets need the secret's resource policy and a customer managed key's policy (aws:PrincipalOrgID in both for a whole organization); replicas get a key in their own Region, and default replicas break cross-account readers.
- CloudWatch Logs data protection masks at ingestion with managed and custom data identifiers; account and log-group policies both apply. SNS message data protection (closed to new customers since 30 April 2026) acts Inbound on publishers and Outbound per subscriber.
- Only an external key store keeps material outside AWS; custom key stores give up multi-Region keys, imported material and KMS rotation.
- Imported material rotates on demand only, and any expired or deleted material makes the whole key unusable; multi-Region keys share material and rotation but not aliases, policies or grants.
- Standard ACM certificate keys never leave AWS; exportable ACM certificates and Private CA certificates hand you the key. Share Private CA through AWS RAM and request through ACM for managed renewal.
Frequently asked questions
How does AWS Secrets Manager rotation work?
Secrets Manager rotates a secret on a schedule either through the owning service (RDS or Redshift managing an admin password, with no function in your account), through a managed external secret for an onboarded SaaS partner, or through a Lambda rotation function, which is either deployed from an AWS-provided template or written by you. A function runs four ordered steps: createSecret stores the new value as AWSPENDING, setSecret applies it to the target, testSecret signs in with the AWSPENDING value, and finishSecret moves the AWSCURRENT label to the new version with UpdateSecretVersionStage. If any step fails, AWSCURRENT does not move, and the leftover AWSPENDING label blocks later rotations until you remove it.
Should I use single-user or alternating-users rotation?
Use single-user rotation when clients re-fetch the secret and retry on authentication failure: it changes one user's password, and the old password stops working immediately. Use alternating-users rotation when the credential must keep working through the switch and the database allows a second user: Secrets Manager alternates between the original user and a clone, using a separate superuser secret, so the previous credential stays valid during the switch. With alternating users, apply every later permission grant to both users, because the clone copies the original's permissions only at the first rotation.
How do I share a Secrets Manager secret with another AWS account?
Two grants are required. Attach a resource policy to the secret that allows the external principal secretsmanager:GetSecretValue, and allow that principal kms:Decrypt on the KMS key that encrypts the secret. The secret must use a customer managed key, because the default aws/secretsmanager key cannot be used from another account. For a whole organization, use an aws:PrincipalOrgID condition in both policies. If the secret is replicated, each replica needs its own customer managed key in its Region that allows the reader.
When should I use Parameter Store instead of Secrets Manager?
Use a Parameter Store SecureString for encrypted values that change only on deployment, such as configuration strings, endpoints and license keys, where the free standard tier and KMS encryption are enough. Use Secrets Manager when the value is a credential that must rotate automatically, be shared across accounts through a resource policy, replicate across Regions or be generated for you. Parameter Store has no native rotation.
What is the difference between imported key material and AWS-generated key material in KMS?
AWS-generated material is created by KMS, never expires, cannot be removed without deleting the key, and supports automatic rotation. Imported material is generated by you and uploaded with a wrapping public key and import token from GetParametersForImport; you can set an expiry, remove it immediately with DeleteImportedKeyMaterial, and rotate it only on demand by importing new material and calling RotateKeyOnDemand. AWS cannot restore imported material you lose, and if any material associated with the key expires or is deleted, the whole key becomes unusable. Both kinds support multi-Region keys; imported multi-Region keys need the same material imported into each related key.
When does a CloudHSM key store or an external key store make sense?
Only when a requirement goes beyond standard KMS custody. A CloudHSM key store keeps KMS keys in your single-tenant CloudHSM cluster, which still runs in AWS data centers, at the cost of keeping the cluster available (at least two active HSMs in different Availability Zones). An external key store keeps the material in your own key manager outside AWS, reached through an XKS proxy, so every KMS call depends on your infrastructure; it is the only option when material must never be in AWS. Both give up multi-Region keys, imported material and KMS-driven rotation.
How do I mask sensitive data in CloudWatch Logs?
Attach a data protection policy with an audit statement and a deidentify statement that reference managed data identifiers (such as credit card numbers or email addresses) and, for your own formats, custom data identifiers defined by a name and a regular expression. An account-level policy covers every current and future log group, and a log-group policy adds rules for one group; both apply. Masking happens at ingestion, so earlier events stay unmasked, and principals with the logs:Unmask permission can view the original values.
Why does my application fail to authenticate after a successful secret rotation?
Because it cached the secret. An application that reads a credential once at startup keeps using the old value after single-user rotation invalidates it, so long-running instances fail while newly started ones work. Re-fetch from Secrets Manager on authentication failure, or use the AWS secret caching libraries with a short TTL. If the client cannot be changed, alternating-users rotation keeps the previous credential valid during the switch.
Source
This lesson covers the "Data Protection" domain of the official SCS-C03 exam guide. Vendors revise their guides — check the source for the current version.
- AWS Certified Security – Specialty (SCS-C03) exam guide — Amazon Web Services
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.