5: Data Protection

    Designing Secure Data-Transit Solutions

    Securing data in transit on AWS is a configuration problem, not a capability problem. Every public-facing service that terminates TLS exposes a security policy knob, and every internal channel between AWS resources offers an opt-in encrypted mode. The exam-relevant failures sit at the boundaries: a load balancer pinned to a deprecated policy that still allows TLS 1.0, an internal channel between Amazon EMR nodes that defaults to plaintext, an Amazon S3 bucket reached over an unencrypted gateway endpoint because no aws:SecureTransport condition was attached, or a backup destination that copies snapshot blocks across the public internet because AWS DataSync was placed on the wrong agent path. The goal of this section is to walk the in-transit surface end to end: which TLS controls exist, which certificate sources feed them, and how secure replication and backup pipelines preserve in-transit confidentiality on top of those primitives.

    Transport Layer Security on AWS load balancers, CloudFront, and API Gateway is governed by a named security policy attached to the listener. The policy bundles a protocol floor (for example, TLS 1.2 or TLS 1.3), a cipher suite list, and an ordering rule that controls whether the server prefers its own list. The decision is not whether to use a policy; the decision is which version to pin. On an Application Load Balancer the policies ELBSecurityPolicy-TLS13-1-2-2021-06 and ELBSecurityPolicy-TLS13-1-2-Res-2021-06 lift the floor to TLS 1.2 and add TLS 1.3 with forward-secrecy cipher suites; the FIPS variants such as ELBSecurityPolicy-TLS13-1-2-FIPS-2023-04 route through FIPS 140-2 validated cryptography for regulated workloads. A Network Load Balancer can terminate TLS on TCP listeners using the same policy family. Amazon CloudFront exposes the equivalent setting on the distribution; the legacy policies TLSv1 and TLSv1.1_2016 are still selectable but enable TLS 1.0 and TLS 1.1 and should never appear in a production design. The exam will test whether you can read a security policy name and recognize whether it accepts a deprecated protocol or a non-forward-secret cipher.

    Certificates feed those listeners from one of two AWS sources. AWS Certificate Manager (ACM) issues public-trust certificates from the Amazon Trust Services public CA; they are free, are deployed regionally, and are renewed automatically when the validation method allows it. AWS Private CA issues private-trust certificates from a customer-controlled hierarchy of root and subordinate CAs; they cost a monthly fee per CA plus a per-certificate fee, and they are intended for internal-only workloads where the relying parties trust the customer's CA chain. ACM-issued public certificates can be attached to Elastic Load Balancing, CloudFront, API Gateway, Cognito custom domains, AWS App Runner, and any AWS service that integrates the ACM provider; ACM private certificates issued through a Private CA can additionally be attached to internal load balancers and re-exported with their private key for use on EC2 instances or on-premises endpoints. The ACM service in us-east-1 is the only Region that holds certificates for CloudFront because the CloudFront control plane is global with a us-east-1 home; for any regional service the certificate must live in the same Region as the resource.

    # Request a public ACM certificate with DNS validation for an ALB in us-east-1
    aws acm request-certificate \
     --domain-name api.example.com \
     --subject-alternative-names "*.api.example.com" \
     --validation-method DNS \
     --key-algorithm RSA_2048 \
     --options CertificateTransparencyLoggingPreference=ENABLED \
     --region us-east-1
    
    # Pin the ALB listener to a TLS 1.3 forward-secret policy
    aws elbv2 modify-listener \
     --listener-arn arn:aws:elasticloadbalancing:us-east-1:111122223333:listener/app/web/abc/def \
     --ssl-policy ELBSecurityPolicy-TLS13-1-2-2021-06 \
     --certificates CertificateArn=arn:aws:acm:us-east-1:111122223333:certificate/55555555-aaaa-bbbb-cccc-dddddddddddd
    

    💡 Exam Trap: A scenario where CloudFront fails to attach an ACM certificate is almost always a Region mismatch. CloudFront only consumes certificates from us-east-1. A regional service such as Application Load Balancer or API Gateway needs the certificate in its own Region.

    📊 Limit: ACM public certificates support a maximum of 10 domain names per certificate by default, raisable through quota request; ACM Private CA certificates support up to 100 SANs per certificate. The default ACM certificate quota per Region per account is 2,500 certificates.

    Implement Secure Replication and Backup

    In-transit confidentiality continues into the replication and backup channel. The four services that move bytes across boundaries on a security engineer's behalf are Amazon Data Lifecycle Manager (DLM), AWS Backup, AWS DataSync, and the per-service replication features baked into Amazon S3, Amazon RDS, and Amazon DynamoDB. Each carries its own in-transit posture.

    Amazon Data Lifecycle Manager schedules EBS snapshots, EBS-backed AMIs, and cross-account snapshot copies. Snapshot data leaves an EBS volume over the AWS internal network; the snapshot itself lives in S3-style storage managed by EC2 and is encrypted at rest with the same KMS key as the source volume by default, or with a copy-target key when DLM is used for cross-Region or cross-account copies. There is no plaintext channel that crosses a customer network in a DLM-driven snapshot pipeline, so the in-transit risk is constrained to whether the copy-target Region is in the customer's compliance perimeter and whether the destination key policy permits the source account to encrypt with it.

    AWS Backup centralizes backup orchestration across EBS, RDS, Aurora, DynamoDB, EFS, FSx, Storage Gateway, Neptune, DocumentDB, Redshift, Timestream, S3, and SAP HANA. Backups are written into a backup vault, the vault is encrypted with a KMS key, and copy jobs to a destination vault re-encrypt the data with the destination vault's key. The exam-critical pattern is the immutable copy: a separate AWS Backup vault, in a separate account in the same AWS Organization, with AWS Backup Vault Lock applied in Compliance mode. Vault Lock in Compliance mode is irreversible; once the lock is engaged after the 3-day cooling-off window expires, even the AWS root user cannot delete or shorten the recovery points until the retention period elapses. This is the ransomware-protection backstop: the production account being fully compromised cannot reach across the trust boundary to delete the immutable vault.

    # Terraform: AWS Backup vault with Compliance-mode Vault Lock, KMS-encrypted
    resource "aws_kms_key" "backup_vault" {
     description = "CMK for immutable backup vault"
     deletion_window_in_days = 30
     enable_key_rotation = true
    }
    
    resource "aws_backup_vault" "immutable" {
     name = "vault-immutable-prod"
     kms_key_arn = aws_kms_key.backup_vault.arn
    }
    
    resource "aws_backup_vault_lock_configuration" "immutable" {
     backup_vault_name = aws_backup_vault.immutable.name
     changeable_for_days = 3
     min_retention_days = 30
     max_retention_days = 2555
    }
    
    resource "aws_backup_plan" "prod_daily" {
     name = "prod-daily-cross-account"
     rule {
     rule_name = "daily"
     target_vault_name = "vault-source-prod"
     schedule = "cron(0 5 * * ? *)"
     lifecycle { delete_after = 35 }
     copy_action {
     destination_vault_arn = aws_backup_vault.immutable.arn
     lifecycle { cold_storage_after = 90, delete_after = 365 }
     }
     }
    }
    

    AWS DataSync moves bulk file data between on-premises file systems (NFS, SMB, HDFS, object stores) and AWS storage (S3, EFS, FSx). DataSync agents run on-premises (or in a VPC for AWS-to-AWS transfers) and tunnel data to the DataSync service endpoint over TLS 1.2 or higher. The default service endpoint is a public DataSync endpoint reachable over the internet; for transfers that must stay on the AWS network, the agent connects to a VPC interface endpoint for DataSync, traffic crosses PrivateLink, and the source-to-destination path never traverses the public internet. The exam-relevant configuration is the PrivateLink activation: the agent is registered with the VPC endpoint ENI's IP addresses, and the security group on the endpoint permits traffic from the agent only.

    Ransomware-protection patterns layer the above primitives. The canonical pattern is the immutable backup tier: a destination account dedicated to backups, an SCP that denies backup:DeleteRecoveryPoint, backup:UpdateRecoveryPointLifecycle, and kms:ScheduleKeyDeletion on the vault key from any principal except a break-glass role, MFA-required role assumption to that account, and Backup Vault Lock in Compliance mode on every vault. A second pattern is air-gapped recovery for S3: same-Region replication into a destination bucket with Object Lock in Compliance mode, the destination bucket owned by a separate AWS account, and an aws:PrincipalOrgID boundary that prevents an externally compromised principal from reaching the bucket even if they steal credentials inside the source account.

    ⚠️ Anti-Pattern: Relying on the source account's S3 versioning alone for ransomware protection. Versioning produces non-current versions, but a compromised principal with s3:DeleteObjectVersion can hard-delete every prior version. The only durable defense is Object Lock in Compliance mode on a bucket whose deletion path the attacker cannot influence.

    🎯 Scenario: A finance team requires that all production database backups survive a full-account compromise. The design that meets this constraint is AWS Backup writing to a source vault in the production account, a scheduled copy job to a vault in a dedicated backup account inside the same AWS Organization, KMS keys in the backup account that deny kms:Decrypt to any source-account principal, and Vault Lock in Compliance mode on the destination vault with a minimum retention of 35 days.

    💡 Exam Trap: AWS Backup Vault Lock has two modes. Governance mode allows users with backup:DisableBackupVaultLock to remove the lock. Compliance mode is irreversible once the 3-day cooling-off window expires; even the root user cannot remove the lock or shorten retention. The exam reuses this distinction in ransomware scenarios. Choose Compliance mode whenever the question requires that not even the account owner can erase the recovery points.

    Decision Anchor: Choose ACM public certificates when the workload terminates TLS at a public endpoint (ALB, CloudFront, API Gateway) for clients on the public internet. Choose ACM Private CA when the workload terminates TLS at an internal endpoint where the relying party trusts your internal CA chain (internal ALB, mTLS between services, EKS service mesh). Choose Backup Vault Lock in Compliance mode when the workload must survive a full-account compromise; choose Governance mode only when operators must retain a documented break-glass path to shorten retention.


    Continue with the interactive course

    Track your progress, jump into practice questions and use the Shark AI tutor inside the AWS - Security Specialty learning hub.