Based on the DEA-C01 exam guideReport an error
aws:SecureTransport deny condition.Data has to be protected both while it is stored and while it moves. At the center of encryption on AWS is KMS (Key Management Service), and data services such as S3, Redshift, and Glue integrate with KMS to use keys.
| Aspect | AWS owned key | AWS managed key | Customer managed key |
|---|---|---|---|
| Visible in your account | No | Yes (aliases like aws/s3) | Yes |
| Edit the key policy | No | No | Yes |
| Rotation | Handled by the service | Automatic every year (cannot be turned off) | Optional. Turn on automatic rotation or rotate manually |
| Cross-account use | No | No (you cannot change the policy) | Yes |
| Delete / disable | No | No | Yes |
| Cost structure | None | No key storage fee, usage requests are charged | Key storage fee (monthly) + usage requests |
| Clue for choosing | When you don't want to think about it | When you need audit records but don't want the management burden | When you must hold access control, rotation, cross-account use, and auditing yourself |
Write
① The service sends a GenerateDataKey request to KMS
② KMS returns the data key in two forms: a plaintext data key + a data key encrypted by the KMS key
③ The service encrypts the data with the plaintext data key and discards the plaintext key from memory
④ The ciphertext data + the encrypted data key are stored together
Read
⑤ The service sends the encrypted data key to KMS with a Decrypt request
⑥ KMS checks the key policy and returns the plaintext data key
⑦ The service decrypts the data with that keykms:Decrypt, and the writer needs kms:GenerateDataKey. "I have S3 permission but can't read an SSE-KMS object" is almost always blocked at step ⑥.💡 Related theory: KMS does not encrypt the data itself; it manages data keys. That is why rotating a KMS key does not re-encrypt data that is already stored. What changes is the key material used to wrap data keys from then on.
kms:* to the account root principal. This statement is what makes it possible to allow key access through IAM policies. Without it, an Allow in an IAM policy has no effect (a Deny still does).{
"Sid": "AllowGlueRoleUseOfKey",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::111122223333:role/GlueETLRole" },
"Action": ["kms:Decrypt", "kms:GenerateDataKey"],
"Resource": "*"
}Resource of * means "this very key the policy is attached to." It does not mean all keys.kms:ViaService condition. For example, if you allow decryption only through S3, the path where the same role calls the KMS API directly to use the key is closed.| Item | Details |
|---|---|
| Automatic rotation | Optional for customer managed keys. When enabled, it creates new key material every 365 days by default, and you can set the period yourself |
| On-demand rotation | Rotates immediately, regardless of the automatic rotation setting |
| Eligible for automatic rotation | Symmetric encryption keys with KMS-generated key material. Asymmetric, HMAC, and custom key store keys are rotated manually (create a new key, then switch the alias) |
| Unchanged after rotation | Key ID, ARN, key policy, alias |
| Past data | The previous key material is preserved, so it still decrypts. No re-encryption takes place |
| Deletion | There is no immediate deletion. You schedule it with a waiting period of 7 to 30 days (default 30), and you can cancel during that time |
| Method | Key owner | Key control / auditing | Caveats |
|---|---|---|---|
| SSE-S3 | S3 | None | Applied by default to all new objects since January 5, 2023, at no additional cost. Cannot be turned off |
| SSE-KMS | KMS key | Key policy, CloudTrail records | A KMS call per object, so cost and throttling are possible → bucket key |
| DSSE-KMS | KMS key (dual layer) | Same as SSE-KMS | For dual-encryption regulations. Does not support bucket keys |
| SSE-C | Customer provides the key on every request | S3 does not store the key | HTTPS required, not usable from the console, lose the key and you lose the object |
| Client-side encryption | Customer | AWS receives only ciphertext | Encryption, decryption, and key management are entirely the application's responsibility |
{
"ServerSideEncryptionConfiguration": {
"Rules": [{
"ApplyServerSideEncryptionByDefault": {
"SSEAlgorithm": "aws:kms",
"KMSMasterKeyID": "arn:aws:kms:ap-northeast-2:111122223333:key/abcd-1234"
},
"BucketKeyEnabled": true
}]
}
}| Changes to know before turning it on | Details |
|---|---|
| KMS events in CloudTrail | The bucket ARN is logged instead of the object ARN, and the number of events drops. Per-object KMS auditing becomes blurrier |
| Encryption context | IAM and key policies that use the object ARN as a condition stop working. Fix them to use the bucket ARN |
| Existing objects | Not affected. It applies from newly written objects |
| Size of the savings | If the requester (role or account) differs, a separate bucket key is obtained for each. The savings are larger with fewer requesters reading many objects in a short time |
| DSSE-KMS | Not supported |
| Service | Setting | Points to know |
|---|---|---|
| Redshift | Encryption of the cluster / serverless namespace | Encrypted by default now. The default key is an AWS owned key, and you can specify a customer managed key. Snapshots are encrypted as well |
| Glue ETL | Security configuration | A bundled setting for encrypting S3 target data, CloudWatch logs, and job bookmarks. Attached to jobs, crawlers, and development endpoints |
| Glue Data Catalog | Catalog settings | Metadata encryption is a separate setting from the security configuration |
| Kinesis Data Streams | Server-side encryption of the stream | Set per stream with a KMS key |
| Athena | Result encryption in the workgroup | Even if the source is encrypted, the query result location is configured separately |
logs:AssociateKmsKey. If it is missing, real-time logging is turned off. A job running inside a VPC fails with a KMS timeout if there is no path to KMS (a KMS VPC endpoint or a NAT).aws:SecureTransport is false in the bucket policy.require_ssl in the parameter group.{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": ["arn:aws:s3:::lake-curated", "arn:aws:s3:::lake-curated/*"],
"Condition": { "Bool": { "aws:SecureTransport": "false" } }
}💡 Related theory: Encryption at rest and encryption in transit are separate protection layers. Even if storage is encrypted with SSE-KMS, data sent over plaintext HTTP is exposed to man-in-the-middle attacks. In a security review question, if "it's encrypted but it was flagged," look for the missing layer.
| Symptom | Cause | Action |
|---|---|---|
| Have S3 permission, but reading an SSE-KMS object is denied | The role lacks kms:Decrypt or the key policy does not allow it | Add it to the key policy and IAM policy |
| Denied even though the IAM policy grants KMS permission | The key policy lacks the statement delegating to the account's IAM | Allow directly in the key policy or add the delegation statement |
| KMS throttling or a charge spike while processing many objects | A KMS call per object | S3 Bucket Key |
| Some access is denied after turning on the bucket key | A condition on an encryption context based on the object ARN | Change it to use the bucket ARN |
| Cross-account sharing fails at decryption | Encrypted with an AWS managed key, or the key policy is missing | Customer managed key + allow the other account in the key policy |
| Changed default encryption but old objects are unchanged | Default encryption applies only to new objects | Re-encrypt by copying |
| A Glue job in a VPC times out on KMS | No path to KMS | KMS VPC endpoint |
| SSE-C upload to a new bucket returns 403 | New buckets block SSE-C by default | Allow it in the bucket encryption settings |
| Clue in the question | Answer |
|---|---|
| "Audit key usage and control access directly" | SSE-KMS + customer managed key |
| "Ease SSE-KMS's KMS cost and throttling, keep key control" | S3 Bucket Key |
| "AWS must never see the plaintext" | Client-side encryption |
| "A regulation requiring two layers of encryption" | DSSE-KMS |
| "Block plaintext HTTP access" | Deny when aws:SecureTransport is false |
| "Force Redshift connections to be encrypted" | require_ssl |
| "Encrypt a Glue job's output, logs, and bookmarks all at once" | Glue security configuration |
| "Another account must read the encrypted data" | Allow the other account in the key policy of a customer managed key |
| "Don't delete the key by mistake" | Disable instead of delete, deletion waiting period |
Tomorrow we cover the problems that encryption and permissions alone can't stop: finding where sensitive data lives (Macie) and reducing exposure (masking and tokenization).
Click a choice to reveal the answer and explanation.
Question 1
You encrypt a large number of S3 objects with SSE-KMS, and the KMS API call cost and throttling have become a problem. What is the most appropriate way to reduce the cost and calls?
Question 2
A regulation requires you to guarantee that AWS can never see the plaintext of the data. Which encryption method is the most suitable?
Question 3
The S3 data is encrypted with SSE-KMS, but a security review flagged that plaintext HTTP access is possible. What action protects data in transit?
Question 4
A Glue ETL job cannot read S3 data encrypted with SSE-KMS and gets a permission error. The Glue job role ARN is not in the key policy. What is the correct fix?
Question 5
Which statement most accurately describes KMS envelope encryption?