Data Security Controls
KMS key policies: cross-account grants, condition keys, ViaService restriction
KMS key access is governed by a key policy (the resource policy on the key) combined with IAM identity policies. The key policy is the authoritative grant — IAM alone is never enough.
Key policy basics: a default key policy grants the AWS account root user full key access; from there, IAM policies can grant key actions to other principals (but only because the root grant exists). To remove this, scope the key policy to specific principals.
Cross-account access pattern:
{
"Sid": "AllowCrossAccount",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::CONSUMER_ACCOUNT:root" },
"Action": ["kms:Decrypt", "kms:DescribeKey", "kms:CreateGrant"],
"Resource": "*"
}
The consumer account's role still needs kms:Decrypt in its identity policy — this is two-layer (resource + identity) authorization, like S3 cross-account access.
Condition keys worth memorising:
kms:ViaService— restricts the key to be used only through a specific AWS service. E.g."kms:ViaService": "s3.us-east-1.amazonaws.com"means this key can only encrypt/decrypt via S3 in us-east-1. Defends against credentials being misused to decrypt the key through unintended services.kms:CallerAccount— restricts to a specific account. Combined with ViaService for fine-grained scoping.aws:SourceArn— restricts to a specific resource (e.g. only requests from one specific Lambda function or RDS instance).kms:EncryptionContext— requires a specific encryption-context dict to be passed; the same context must be supplied at decrypt time. Used as a sub-key for envelope encryption scenarios.
Grants vs key policy:
- Key policies are static — edit them and you change permanent permissions.
- Grants are temporary, programmatic — created via
kms:CreateGrant, can be revoked or expire. AWS services (e.g. RDS encryption, EBS encryption) create grants automatically when they need temporary access.
For short-lived workloads needing temporary key access, grants are the pattern. For permanent integration, key policy.
ViaService restriction example (a common SAA scenario):
{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::ACCOUNT:role/AppRole" },
"Action": ["kms:Encrypt", "kms:Decrypt"],
"Resource": "*",
"Condition": {
"StringEquals": {
"kms:ViaService": "s3.us-east-1.amazonaws.com",
"kms:CallerAccount": "123456789012"
}
}
}
This role can encrypt/decrypt via this key — but only when the request comes through S3 in us-east-1 from account 123456789012. Misuse via SQS / Lambda / direct KMS API is denied.
S3 encryption options: SSE-S3 vs SSE-KMS vs SSE-C vs DSSE-KMS — when each applies
S3 supports four server-side encryption options. Since January 2023, SSE-S3 is enabled by default on every new bucket. The exam tests when to upgrade to a more controlled option.
SSE-S3 (AES-256 with AWS-managed keys):
- AWS manages key creation, rotation, and storage entirely.
- Free; no KMS API charges.
- NO CloudTrail audit of individual encrypt/decrypt operations.
- Use for: default for non-sensitive data, public marketing content.
SSE-KMS with AWS-managed key (aws/s3):
- AWS-managed key per region; free.
- Adds KMS API charges per encrypt/decrypt request.
- CloudTrail logs every key use (full audit trail).
- Key policy not editable — fine for general compliance, not for cross-account.
- Use for: compliance audit needs without cross-account complexity.
SSE-KMS with customer-managed key:
- You create the key; ~$1/key/month + per-request charges.
- Full key policy control: cross-account, conditions, ViaService.
- Auto rotation (yearly) opt-in.
- Use for: multi-tenant isolation (key-per-tenant), cross-account encrypted access, regulatory compliance.
SSE-C (Customer-Supplied Key):
- Caller provides the encryption key in every PUT/GET request (HTTPS only).
- AWS doesn't store the key — caller responsible for key management.
- No KMS API costs (KMS is bypassed entirely).
- No CloudTrail of key use.
- Use for: rare scenarios where customer MUST hold the key entirely outside AWS.
DSSE-KMS (Dual-layer SSE-KMS):
- Each object encrypted twice with two independent KMS calls.
- ~2× KMS request cost.
- Required for FedRAMP High workloads.
- Use for: government / defense workloads with explicit dual-layer requirement.
Decision pattern:
- 'Default encryption / public marketing content' → SSE-S3 (auto-on).
- 'Compliance audit / who decrypted what' → SSE-KMS (any flavour).
- 'Cross-account encrypted access' → SSE-KMS with customer-managed key.
- 'Multi-tenant data isolation' → SSE-KMS with separate customer-managed key per tenant.
- 'FedRAMP High / dual-layer' → DSSE-KMS.
- 'Customer must hold the key' → SSE-C.
Bucket-level enforcement — combine with a bucket policy denying non-encrypted uploads:
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::our-bucket/*",
"Condition": {
"StringNotEquals": { "s3:x-amz-server-side-encryption": "aws:kms" }
}
}
This denies any PUT that doesn't specify SSE-KMS — guarantees no plaintext ever lands in the bucket.
ACM certificate provisioning: DNS vs email validation, auto-renewal lifecycle
AWS Certificate Manager (ACM) issues free TLS/SSL certificates for AWS services. The exam tests when ACM works, where the certificate must live, and how validation + renewal happen.
Where ACM-issued certificates can be used:
- CloudFront — certificate MUST be in us-east-1 (regardless of where your origin is).
- ALB / NLB / API Gateway / App Runner — certificate must be in the SAME region as the resource.
- Route 53 — used for ACM-issued certs validated via DNS in the hosted zone.
Issuance and validation:
- Request certificate: list domain names (FQDN + optional wildcards like
*.example.com). - Pick validation method:
- DNS validation (preferred): ACM gives you a CNAME record to add to your domain's DNS. Once propagated, ACM auto-validates and issues. Auto-renewal happens automatically every year as long as the CNAME stays in place.
- Email validation: ACM sends approval emails to standard addresses (admin@, hostmaster@, webmaster@) for the domain. Requires manual click to approve, every renewal (every year). Don't use unless you have to.
- Certificate issued → install on the AWS resource.
Auto-renewal:
- DNS-validated certificates renew automatically 60 days before expiry. ACM checks the CNAME, validates, reissues. Zero downtime if the certificate is attached to a managed AWS resource (CloudFront, ALB).
- Email-validated certificates DON'T auto-renew — you must respond to a new email approval every year. Exam common trap: 'why did my ALB stop accepting HTTPS?' → email validation expired.
Private CA (ACM Private CA):
- ACM also offers a managed private CA for internal certificates (services that talk to each other internally over TLS).
- ~$400/month per CA hierarchy + per-certificate fee.
- Used for mutual-TLS (mTLS) on internal services.
Importing third-party certificates:
- You can import certs from external CAs (DigiCert, Let's Encrypt, etc.). Stored in ACM, usable on AWS services.
- Imported certs DON'T auto-renew — you must re-import the renewed cert. ACM sends expiry notifications via CloudWatch.
Public vs private certificates:
- ACM public certs (from Amazon Trust Services) are trusted by browsers worldwide. Free.
- ACM private certs (from your ACM Private CA) are trusted only by clients that trust the private CA. For internal mTLS.
Exam patterns:
- 'CloudFront with custom domain' → ACM cert in us-east-1.
- 'ALB HTTPS in us-west-2' → ACM cert in us-west-2.
- 'Internal microservices mTLS' → ACM Private CA + per-service private certs.
- 'Imported cert from Let's Encrypt' → no auto-renewal; CloudWatch alarm on expiry.
Block Public Access semantics: account vs bucket vs object level overrides
S3 Block Public Access (BPA) is the strongest defense against accidental public bucket exposure. It applies at three levels and uses an explicit override hierarchy.
Four settings, each toggle-able:
BlockPublicAcls— prevents new public ACLs from being applied. Existing public ACLs remain (unless setting #2 is also on).IgnorePublicAcls— ignores all public ACLs (existing or new). The bucket / object isn't removed; ACLs are just not honored.BlockPublicPolicy— prevents new bucket policies that grant public access.RestrictPublicBuckets— even if a bucket policy somehow grants public access, only AWS principals + AWS services can access; anonymous internet requests are blocked.
Level hierarchy (most restrictive wins):
- Organization level (S3 Block Public Access at the Organizations level) — applies to every account in every member account. Cannot be overridden by member account admins.
- Account level — per-account setting. Overrides bucket-level if more restrictive.
- Bucket level — per-bucket setting. Applies to that bucket only.
- Object level — individual object ACLs (still subject to all the above).
Trap the exam loves: a bucket policy that allows s3:GetObject from "Principal": "*" and BPA is on at the account level. Outcome: BPA wins; bucket is not public. The policy is evaluated but the public-access result is suppressed by BPA. This is correct — BPA was designed exactly to override misconfigurations.
Organization-wide enforcement pattern:
To enforce 'no S3 bucket can ever be public anywhere in our Organization':
- AWS Organizations → S3 BPA at root level → all four settings enabled.
- Optional SCP at root denying
s3:PutPublicAccessBlockso member account admins can't disable BPA. - AWS Config rule
s3-bucket-public-access-prohibitedto detect any drift.
When to disable BPA: only for intentional public static-website hosting. Even then, prefer CloudFront in front of a private bucket (with Origin Access Control) to expose content while keeping the bucket itself private.
SCPs vs BPA: SCPs can deny S3 actions (PutBucketPolicy, PutObjectAcl) but cannot inspect bucket policy content. BPA inspects content — it's the only way to enforce 'no public exposure' regardless of how a bucket policy is written. The exam answer for organizational guarantee is BPA at the org level, not SCP.
Macie job tuning: managed identifiers vs custom regex, cost-control patterns
Amazon Macie scans S3 buckets for PII, PHI, financial data, and credentials. It's S3-only — no other data sources. Cost is per-GB scanned + per-object analyzed; petabyte-scale buckets are expensive to scan fully.
Two finding types:
- Policy findings — public buckets, unencrypted buckets, ACL grants to anonymous. Discovered continuously, free.
- Sensitive data findings — actual PII detected in objects. Requires running a discovery job; costs per GB.
Managed identifiers (built-in regex + dictionary patterns):
- PII: Social Security numbers (US), passport numbers (many countries), driver's licenses, credit card numbers, IBANs, bank account numbers.
- PHI: medical record numbers, NPI, diagnosis codes.
- Credentials: AWS access keys, OAuth tokens, SSH keys, X.509 private keys.
- Country-specific: tax IDs, national IDs for ~30+ countries.
Managed identifiers are accurate (high precision, low false-positive rate). Use them by default.
Custom data identifiers — your own regex + keywords:
Regex: ^[A-Z]{2}\d{6}$ (e.g. employee ID format)
Keywords: ["employee", "emp_id"]
Maximum match distance: 50 characters
Ignore words: ["test", "sample"]
Use for: company-specific identifiers (employee IDs, internal codes), regulated data formats unique to your domain.
Cost-control patterns:
- Bucket inclusions / exclusions: scope a job to specific buckets only. Don't scan obvious-non-PII buckets (build artifacts, log archives older than 90 days).
- Object filtering: include only specific file extensions / prefixes / tags. E.g. scan only
s3://uploads/prefix where users put data, nots3://thumbnails/. - Sampling depth: Macie samples a percentage of objects rather than scanning every one. Set sampling depth to balance cost vs coverage.
- One-time vs scheduled jobs: full one-time scan after migration; then monthly incremental scans on critical buckets.
- Findings aggregation: route Macie findings to Security Hub via EventBridge for cross-account visibility.
Multi-account deployment:
- Enable Macie at the Organizations level via the delegated administrator account.
- Designate one account (typically security tooling account) as the Macie administrator; it gets visibility into all member accounts' findings.
Common exam scenario:
'After migration, audit S3 buckets across all accounts for PII without disrupting workloads' → Macie via Organizations + delegated administrator + one-time discovery job + scope to migration buckets + custom data identifier for company-specific employee IDs.
CloudHSM cluster setup: cross-AZ, client SDK, key replication
AWS CloudHSM provides dedicated, FIPS 140-2 Level 3 validated Hardware Security Modules in your VPC. You control the keys entirely; AWS provides the hardware. Required for workloads with strict regulatory requirements like 'must store keys in a dedicated HSM', FedRAMP Moderate/High with HSM mandate, or government/defense.
Cluster topology:
A CloudHSM cluster = 1+ HSM instances in your VPC. Each HSM is ~$1.45/hr = ~$1 000/month. For production HA, run 2+ HSMs in different AZs (otherwise AZ failure = key loss).
Keys are replicated synchronously across HSMs in the same cluster. Operations are load-balanced.
Setup steps (mechanical, but the exam may test the sequence):
- Create cluster — choose VPC + 2+ subnets in different AZs.
- Initialize cluster — generate the cluster's CA certificate; sign it.
- Activate HSMs — set the Crypto Officer (CO) credentials. CO administrates the HSM; can't perform crypto operations (separation of duties).
- Create Crypto Users (CU) — application identities that do encrypt/decrypt/sign/verify. Each CU has its own keys.
- Connect clients — install the CloudHSM Client SDK on EC2 instances, configure cluster endpoint, authenticate as a CU.
Client SDK options:
- PKCS #11 — standard cryptographic API; works with most languages.
- JCE (Java Cryptography Extension) — Java apps.
- CNG (Cryptography Next Generation) — Windows / .NET.
- OpenSSL Dynamic Engine — for apps using OpenSSL APIs.
Common integration patterns:
- TLS offload: nginx/Apache uses CloudHSM via OpenSSL engine to sign TLS handshakes. Private key never leaves the HSM.
- Code signing: build pipeline signs releases with a CloudHSM-stored signing key. Compliance-required for signed software.
- Database encryption: Oracle TDE / SQL Server TDE encrypts at the database engine layer using CloudHSM-stored keys.
- Custom AWS KMS Custom Key Store: bridge CloudHSM + KMS — KMS API on top of HSM-stored keys. Lets AWS services (S3, EBS) use HSM-backed keys transparently while you retain key custody.
Backup:
CloudHSM auto-backs up the cluster to S3 (encrypted, AWS-managed). Backups are tied to your cluster's CA certificate — restoring requires the original CA.
vs KMS:
- KMS = FIPS 140-2 Level 2 (Level 3 for some operations); shared-tenancy under the hood; AWS controls the hardware. Cheaper, simpler.
- CloudHSM = FIPS 140-2 Level 3; single-tenant hardware in YOUR VPC; you control. Required only when the spec explicitly mandates HSM custody.
Exam triggers for CloudHSM:
- 'FIPS 140-2 Level 3' → CloudHSM.
- 'Customer must control key material entirely' → CloudHSM (or imported key material in KMS, depending on context).
- 'Dedicated hardware' → CloudHSM.
- Otherwise → KMS is the default.
S3 server-side encryption options
| Type | Key custody | Per-request cost | Auditable in CloudTrail | Use when |
|---|---|---|---|---|
| SSE-S3 | AWS-managed | No | No | Default; non-sensitive data |
| SSE-KMS (AWS-managed key) | AWS-managed | Yes (KMS request) | Yes | Compliance audit needs |
| SSE-KMS (customer-managed key) | You manage policy + rotation | Yes | Yes | Multi-tenant or fine-grained access |
| SSE-C | You provide key per request | No KMS cost | No | Rare; specific compliance needs |
| DSSE-KMS | AWS + customer | Yes (2x KMS) | Yes | Defense-in-depth dual layer (FedRAMP High) |
Decision tree
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- Encrypt by default — at rest AND in transit
Compliance (HIPAA, PCI, GDPR) requires both: SSE or KMS at rest, TLS in transit. S3 default encryption is SSE-S3 since Jan 2023; enable bucket policy that requires
aws:SecureTransport=trueto enforce TLS for clients.- KMS four-tier hierarchy: AWS-owned → AWS-managed → customer-managed → CloudHSM
AWS-owned: free, no visibility. AWS-managed: free, audit trail. Customer-managed: ~$1/key/month + per-request, full control + cross-account share + rotation. CloudHSM: dedicated FIPS 140-2 Level 3, highest cost.
4 questions test this
- A healthcare organization must comply with strict regulatory requirements that mandate full control over encryption key generation and…
- A financial services company requires that all encryption keys used for customer data be stored in dedicated hardware security modules that…
- A company needs to share an encrypted Amazon RDS snapshot with a partner organization in a different AWS account. The RDS database is…
- A healthcare company requires that encryption keys used for patient data be stored in single-tenant hardware security modules (HSMs) to…
- Bucket-level controls before object-level
Block Public Access at account + bucket level kills ACL footguns. Default encryption applies to all objects. Object-level ACLs and per-object policies should be the exception, not the pattern — they're hard to audit at scale.
3 questions test this
- A security team discovers that developers have inadvertently made several S3 buckets publicly accessible through bucket policies and ACLs.…
- A company recently migrated to AWS and created several new S3 buckets. The security team wants to ensure that all buckets in the account…
- A company recently experienced a security incident where an S3 bucket was accidentally made public by a developer. The company wants to…
- Macie discovers + classifies S3 PII / PHI
Macie scans S3 buckets for PII, PHI, financial data, and credentials using managed identifiers + custom regex. Findings route via EventBridge for auto-remediation. Cost is ~$1/GB scanned — scope by bucket selectively, not org-wide blind.
10 questions test this
- A company wants to implement automated remediation when Amazon Macie detects high-severity sensitive data findings in S3 buckets. The…
- A financial services company stores customer records containing personally identifiable information (PII) in multiple Amazon S3 buckets…
- A healthcare company stores patient records in Amazon S3 buckets across multiple AWS accounts managed by AWS Organizations. The security…
- A company uses Amazon Macie to discover sensitive data in their S3 buckets. The security team needs to detect employee ID numbers that…
- A healthcare organization needs to detect proprietary patient record identifiers stored in Amazon S3 buckets. These identifiers follow a…
- A company stores customer data in Amazon S3 buckets across multiple AWS accounts. The security team must discover and classify sensitive…
- A healthcare company needs to ensure compliance with HIPAA regulations by identifying protected health information (PHI) stored in Amazon…
- A company enables Amazon Macie to perform automated sensitive data discovery and wants to implement an automated workflow that responds to…
- A healthcare organization is using Amazon Macie to scan S3 buckets for sensitive patient data. The organization has specific internal…
- A healthcare organization needs to configure Amazon Macie to detect custom patient identifier formats that are specific to their internal…
- S3 default encryption is SSE-S3, on by default since Jan 2023
Every new S3 bucket gets SSE-S3 enabled automatically[1]. You can upgrade to SSE-KMS at any time. Pre-2023 buckets may still be unencrypted — audit with AWS Config rule
s3-bucket-server-side-encryption-enabled.- KMS automatic rotation: yearly (CMKs only)
Customer-managed KMS keys support automatic yearly rotation[18] — opt-in via
EnableKeyRotationAPI. AWS-managed keys rotate every year automatically with no opt-in. Imported key material doesn't auto-rotate; you must re-import.- KMS deletion has a 7–30 day pending window
ScheduleKeyDeletion[19] requires a 7–30 day waiting period — there's no instant delete. Within that window, you canCancelKeyDeletion. Use for accidental-deletion protection. CloudHSM, by contrast, allows immediate key destruction.- Macie cost: ~$1/GB scanned + per-object analysis
Initial discovery scan can be expensive on petabyte-scale buckets. Common pattern: full scan once after migration, then scheduled monthly scans on critical buckets only. Use
excludes[15] filters to skip large non-sensitive prefixes.- KMS grants vs key policies — use grants for ephemeral access
Key policies are static — edit them and you change permanent permissions. Grants[20] are temporary, programmatic permissions issued via
kms:CreateGrant— perfect for short-lived workloads that need temporary access to a key. AWS services (e.g. RDS encryption) create grants automatically.4 questions test this
- A company uses Amazon S3 to store sensitive financial data. The security team requires that all data be encrypted using AWS KMS customer…
- A company uses AWS KMS customer managed keys to encrypt data for a critical application. The application runs on Amazon EC2 instances and…
- A company is deploying an application that uses Amazon RDS with encryption enabled using an AWS KMS customer managed key. The application…
- A company is implementing a new data processing application on AWS. Multiple AWS services including Amazon RDS, Amazon S3, and AWS Lambda…
- KMS ViaService condition restricts a key to one service
Add
Condition: { StringEquals: { kms:ViaService: "s3.us-east-1.amazonaws.com" } }[21] to a key policy → that key can only be used via S3 in us-east-1. Defense against credentials being misused to decrypt the key elsewhere.6 questions test this
- A company uses AWS KMS customer managed keys to encrypt Amazon EBS volumes. The security team wants to ensure that only the Amazon EC2…
- A company uses AWS KMS customer managed keys to encrypt data across multiple AWS services including Amazon S3, Amazon EBS, and Amazon RDS.…
- A company uses a customer managed AWS KMS key to encrypt Amazon EBS volumes. The company wants to implement the principle of least…
- A company is deploying an application that uses Amazon RDS with encryption enabled using an AWS KMS customer managed key. The application…
- A financial services company stores sensitive customer data in Amazon S3 and uses AWS KMS customer managed keys for encryption. The…
- A financial services company is implementing encryption at rest for sensitive data stored in Amazon S3. The security team requires that a…
- S3 Object Lock: write-once compliance retention
Two modes: Governance (admin can override) vs Compliance (no one, not even root, can shorten retention or delete during the window). Required for SEC 17a-4(f) / FINRA / CFTC compliance[22]. Set per-object or via default retention policy on the bucket. Versioning must be on.
- ACM certificate for CloudFront must be in us-east-1
AWS Certificate Manager certificates used with Amazon CloudFront must be requested or imported in the US East (N. Virginia) Region (us-east-1), regardless of where the origin or end users are located. CloudFront is a global service, and certificates in us-east-1 are automatically distributed to all edge locations configured for the distribution. A certificate in any other region will not appear in the CloudFront console.
11 questions test this
- A company is deploying a new web application that will use Amazon CloudFront with a custom domain name. The company requires HTTPS…
- A company is deploying a new web application that uses Amazon CloudFront as the content delivery network. The application requires HTTPS…
- A company wants to use a custom domain name with HTTPS for their Amazon CloudFront distribution. A solutions architect needs to use AWS…
- A company is deploying a new Amazon CloudFront distribution to serve content using a custom domain name (www.example.com) over HTTPS. The…
- A solutions architect is configuring an Amazon CloudFront distribution to serve content for a web application using a custom domain name.…
- A company is migrating its e-commerce application to AWS. The application will use Amazon CloudFront with a custom domain name…
- A company is deploying a web application that uses Amazon CloudFront with a custom domain name. The company has requested an SSL/TLS…
- A company wants to use a custom domain name with HTTPS for an Amazon CloudFront distribution. The company's infrastructure is deployed in…
- A company is deploying a new application using Amazon CloudFront with a custom domain name (app.example.com). The solutions architect needs…
- A company hosts a website using Amazon CloudFront with an Application Load Balancer as the origin. The company wants to use a custom domain…
- A company is configuring a new Amazon CloudFront distribution to serve content for their custom domain www.example.com. The solutions…
- S3 Object Ownership — Bucket owner enforced disables ACLs
Setting S3 Object Ownership to Bucket owner enforced disables all ACLs on the bucket and makes the bucket owner the automatic owner of every object, including objects uploaded by other AWS accounts. Access is then controlled exclusively through bucket policies and IAM policies. This is the AWS-recommended default for new buckets and resolves cross-account upload scenarios where the uploader would otherwise retain object ownership.
11 questions test this
- A company has an S3 bucket that receives objects uploaded by an external partner from a different AWS account. The company wants to ensure…
- A company allows a partner organization in a different AWS account to upload files to an S3 bucket. The company has noticed that after…
- A company has an S3 bucket that receives data uploads from multiple AWS accounts within its organization. The company wants to simplify…
- A company has an S3 bucket that receives uploads from multiple AWS accounts within the same organization. The company requires that the…
- A company recently migrated to AWS and is using Amazon S3 to store application data. The company's legacy application uploads objects to S3…
- A company has an existing S3 bucket that was created before April 2023 and uses ACLs to grant read access to several external AWS accounts.…
- A company has an S3 bucket that receives objects uploaded by multiple AWS accounts belonging to partner organizations. The company wants to…
- A company recently migrated to AWS and has multiple teams uploading objects to a shared S3 bucket from different AWS accounts within the…
- A company in Account A wants to share an Amazon S3 bucket with users in Account B. The company uses the default S3 Object Ownership setting…
- A company has an S3 bucket where multiple AWS accounts within the same AWS Organization upload data files. The bucket owner wants to ensure…
- A company has enabled S3 Object Ownership with the Bucket owner enforced setting on a bucket used for storing application logs. Partner…
- S3 Block Public Access at org level overrides account and bucket settings
S3 Block Public Access can be enforced at the AWS Organizations level by attaching the policy at the root or OU. This setting propagates to all member accounts, including newly joined accounts, and overrides account-level and bucket-level Block Public Access settings. Individual account administrators cannot remove it. To allow a specific account to host a public bucket, the org administrator must exclude that account from the policy.
6 questions test this
- A solutions architect is configuring security controls for S3 buckets across multiple AWS accounts within an AWS Organization. The…
- A company has enabled S3 Block Public Access at the organization level through AWS Organizations. A developer in one of the member accounts…
- A company has multiple AWS accounts within an AWS Organization. The security team wants to ensure that no S3 bucket in any member account…
- A company wants to ensure that no S3 buckets across all AWS accounts in its organization can be made publicly accessible. The security team…
- A company uses Amazon S3 to store sensitive data. The company's security policy requires that all S3 buckets must never allow public access…
- A company wants to ensure that all S3 buckets across their organization cannot be made publicly accessible, even if individual bucket…
- S3 Bucket Keys reduce SSE-KMS request costs by up to 99%
When S3 Bucket Keys are enabled on a bucket configured with SSE-KMS, AWS KMS generates a bucket-level key that S3 uses to create data keys for individual objects, dramatically reducing the number of direct calls to AWS KMS. This can cut KMS request costs by up to 99% on high-traffic buckets while keeping all objects encrypted with the customer managed key.
6 questions test this
- A company stores sensitive data in an S3 bucket encrypted with SSE-KMS using a customer managed key. The bucket receives millions of PUT…
- A solutions architect needs to reduce AWS KMS costs for an Amazon S3 bucket that stores millions of objects encrypted with SSE-KMS. The…
- A company stores large datasets in an Amazon S3 bucket encrypted using SSE-KMS with a customer managed key. The company has noticed high…
- A company is experiencing high AWS KMS costs due to a large volume of S3 GET and PUT requests on buckets encrypted with SSE-KMS using…
- A company uses Amazon S3 with SSE-KMS encryption for its data lake. The data lake contains billions of objects that are frequently accessed…
- A company is migrating workloads to AWS and plans to store data in Amazon S3 using server-side encryption with AWS KMS customer managed…
- Cross-account KMS access requires both a key policy and an IAM policy
Granting cross-account access to a customer managed KMS key requires two configurations: the key policy in the key-owning account must grant permissions to the external account (or specific principal), and an IAM policy in the external account must explicitly allow the principals to use that specific key ARN. The key policy determines who can have access; the IAM policy determines who does have access. Neither alone is sufficient.
8 questions test this
- A company manages secrets in a centralized AWS account and needs to share database credentials with applications running in multiple…
- A company has two AWS accounts: Account A (111122223333) for production workloads and Account B (444455556666) for analytics. The analytics…
- A company has multiple AWS accounts managed by AWS Organizations. The security team manages database credentials centrally in a dedicated…
- A company uses AWS KMS customer managed keys to encrypt data stored in Amazon S3 buckets. A development team in a different AWS account…
- A company needs to allow an application running in Account B to decrypt data that was encrypted using a customer managed key stored in…
- A company is configuring cross-account access to an AWS KMS customer managed key. The key exists in Account A and must be used by an…
- A solutions architect is configuring cross-account access to an AWS KMS customer managed key. Account A (111111111111) owns the KMS key and…
- A company has multiple AWS accounts managed through AWS Organizations. A central security account contains customer managed AWS KMS keys…
- S3 Batch Operations re-encrypts existing objects in place
Changing a bucket's default encryption configuration only affects newly uploaded objects; existing objects retain their original encryption. To re-encrypt billions of existing objects with a new SSE-KMS customer managed key, use S3 Batch Operations with the Copy operation, which copies objects back to the same bucket while applying the new encryption settings.
4 questions test this
- A company is migrating an existing S3 bucket from SSE-S3 to SSE-KMS encryption with a customer managed key to meet new compliance…
- A company recently configured an S3 bucket to use SSE-KMS with a customer managed key as the default encryption. The bucket already…
- A company has an existing S3 bucket containing millions of objects encrypted with SSE-S3. Due to new compliance requirements, the company…
- A company changed its S3 bucket default encryption from SSE-S3 to SSE-KMS with a customer managed key for compliance requirements. The…
- KMS keys are Region-specific — cross-Region replicas need a key in the target Region
AWS KMS keys are Regional resources and cannot be used across AWS Regions. When creating an encrypted cross-Region RDS read replica, you must specify a customer managed key (or AWS managed key) that exists in the destination Region. Similarly, an S3 bucket can only use a KMS key from the same Region for SSE-KMS encryption.
5 questions test this
- A company has configured an Amazon S3 bucket in the us-east-1 Region with SSE-KMS using a customer managed key. A solutions architect…
- A company operates an Amazon RDS for MySQL database in the us-east-1 Region encrypted with a customer managed AWS KMS key. The company…
- A solutions architect is implementing encryption at rest for Amazon RDS databases in a multi-Region disaster recovery architecture. The…
- A company is setting up an Amazon RDS for MySQL database with a read replica in a different AWS Region for disaster recovery. The primary…
- A company operates an encrypted Amazon RDS for MySQL database in the us-east-1 Region. The database is encrypted using a customer managed…
- Macie delegated admin manages org-wide discovery without using the management account
In an AWS Organizations environment, the management account designates a dedicated security account as the Macie delegated administrator. The delegated administrator can enable Macie in member accounts, run sensitive data discovery jobs across the organization, and aggregate findings centrally. AWS best practice is to use a separate security account rather than the management account for day-to-day Macie operations. Automated sensitive data discovery uses sampling to assign sensitivity scores to every S3 bucket, providing broad visibility cost-efficiently.
6 questions test this
- A media company has enabled Amazon Macie to monitor sensitive data across their Amazon S3 environment. They want to continuously evaluate…
- A solutions architect is setting up Amazon Macie for a large enterprise with over 200 AWS accounts managed through AWS Organizations. The…
- A company is deploying Amazon Macie across an AWS Organizations structure with 50 member accounts. The security operations team in the…
- A large enterprise manages 200 AWS accounts using AWS Organizations. The security team wants to centrally discover and monitor sensitive…
- A company stores customer data in Amazon S3 buckets across multiple AWS accounts. The security team must discover and classify sensitive…
- A company stores customer data across hundreds of Amazon S3 buckets in multiple AWS accounts managed by AWS Organizations. The security…
- CloudFront SNI-only SSL is cost-free and supports all modern browsers
Server Name Indication (SNI) allows CloudFront to serve HTTPS requests with custom SSL certificates without requiring a dedicated IP address per certificate, incurring no additional monthly charge. All modern browsers released after 2010 support SNI. The alternative, Dedicated IP SSL, incurs an additional monthly fee per distribution and is only needed for legacy clients that do not support SNI.
6 questions test this
- A solutions architect is configuring an Amazon CloudFront distribution with a custom SSL/TLS certificate from AWS Certificate Manager…
- A company is configuring Amazon CloudFront to use a custom domain name with HTTPS. The solutions architect needs to choose between SNI…
- A company is configuring a CloudFront distribution with a custom domain name and needs to enable HTTPS using an ACM certificate. The…
- A media company operates a CloudFront distribution serving video content over HTTPS. The company wants to enforce TLS 1.2 as the minimum…
- A company is configuring Amazon CloudFront with a custom SSL/TLS certificate for alternate domain names. The company wants to minimize…
- A company has an Amazon CloudFront distribution with a custom domain name and an ACM certificate. The company wants to enforce HTTPS…
- Set Origin Protocol Policy to HTTPS Only and minimum TLS 1.2 for encrypted CloudFront-to-origin traffic
To enforce HTTPS between CloudFront and a custom origin, set the Origin Protocol Policy to HTTPS Only and configure the minimum origin SSL protocol to TLSv1.2. CloudFront returns HTTP 502 (Bad Gateway) if the origin presents a self-signed certificate or an untrusted certificate chain when HTTPS Only is active — the origin certificate must be signed by a trusted CA.
3 questions test this
- A company wants to ensure encrypted communication between Amazon CloudFront and its custom origin server running on Amazon EC2 instances…
- A company is deploying an Amazon CloudFront distribution with a custom origin server running on Amazon EC2. The company needs to enforce…
- A company uses Amazon CloudFront to deliver content from an Application Load Balancer origin. The security team requires that all…
- SSE-KMS upload requires
kms:GenerateDataKey; download requireskms:Decrypt When uploading objects to an S3 bucket configured with SSE-KMS, Amazon S3 calls AWS KMS to generate a data key, requiring
kms:GenerateDataKeyon the key. When downloading, S3 must decrypt the data key, requiringkms:Decrypt. Both permissions are needed for an application that both uploads and downloads. An IAM policy missing either permission will cause the corresponding S3 operation to fail with an AccessDenied error.6 questions test this
- A company's application uploads large files to an Amazon S3 bucket using multipart upload. The bucket is configured with default encryption…
- A company stores sensitive financial data in Amazon S3 buckets. A security architect needs to configure server-side encryption using AWS…
- A company needs to implement server-side encryption for sensitive data stored in Amazon S3 using AWS KMS customer managed keys. Application…
- A solutions architect is configuring an IAM role that will be used by an application to read and write objects to an S3 bucket encrypted…
- A company stores sensitive customer data in an Amazon S3 bucket and uses server-side encryption with AWS KMS customer managed keys…
- A company stores sensitive financial data in Amazon S3 and requires strict control over encryption keys. The security team wants to use…
- Cross-account Secrets Manager access requires a resource policy on the secret AND KMS key policy
Accessing a Secrets Manager secret from a different AWS account requires both a resource-based policy on the secret (granting
secretsmanager:GetSecretValue) and a key policy on the encrypting KMS key (grantingkms:Decrypt). The AWS managed keyaws/secretsmanagercannot be used for cross-account access because its key policy cannot be modified; a customer managed key is required.8 questions test this
- A company manages secrets in a centralized AWS account and needs to share database credentials with applications running in multiple…
- A solutions architect is designing a multi-account architecture where applications in multiple production AWS accounts need to access…
- A company has multiple AWS accounts managed by AWS Organizations. The security team manages database credentials centrally in a dedicated…
- A company uses AWS Organizations to manage multiple AWS accounts. The central security account stores database credentials in AWS Secrets…
- A company stores database credentials for production workloads in AWS Secrets Manager in a central security account. Application teams in…
- A company is implementing a centralized secrets management strategy. The security team stores database credentials in AWS Secrets Manager…
- A company stores sensitive application secrets in AWS Secrets Manager in a central security account. Applications running in separate…
- A financial services company has a central security account that stores database credentials for Amazon RDS instances running in multiple…
- Use
kms:EncryptionContext:SecretARNto scope Lambda rotation function's KMS decrypt to one secret When a Secrets Manager secret is encrypted with a customer managed KMS key, the Lambda rotation function's execution role needs
kms:Decrypton that key. Adding a condition using thekms:EncryptionContext:SecretARNkey restricts the function to decrypt only the specific secret it is authorized to rotate, following least-privilege. Without this condition, a single KMS permission would allow decryption of any secret encrypted with the same key.5 questions test this
- A solutions architect is configuring automatic rotation for an Amazon Aurora MySQL database secret in AWS Secrets Manager. The secret is…
- A company stores Amazon RDS for Oracle database credentials in AWS Secrets Manager. The security team requires that the Lambda rotation…
- A company is configuring AWS Secrets Manager to rotate credentials for an Amazon DocumentDB cluster. The secret is encrypted with a…
- A company stores API keys and database credentials in AWS Secrets Manager. The security team requires that all secrets encrypted with…
- A company has configured automatic rotation for an Amazon RDS MySQL database secret in AWS Secrets Manager. The secret is encrypted with a…
- VPC endpoints can use endpoint policies to scope allowed actions
An Interface or Gateway endpoint can carry its own endpoint policy[23] restricting which API actions and resources are allowed through it. Common pattern: S3 Gateway endpoint allows
s3:GetObjecton your specific buckets only — anything else through the endpoint is denied.
Also tested in
References
- Amazon S3 default encryption now SSE-S3 (AWS News Blog, Jan 2023) Blog
- Specifying server-side encryption with AWS KMS (SSE-KMS)
- Protecting data using server-side encryption with customer-provided keys (SSE-C)
- Using dual-layer server-side encryption with AWS KMS keys (DSSE-KMS)
- AWS Certificate Manager User Guide
- AWS KMS concepts (key types)
- AWS KMS pricing
- AWS CloudHSM introduction
- Getting started with AWS CloudHSM
- AWS KMS multi-region keys overview
- Blocking public access to S3 storage
- Setting default server-side encryption for an S3 bucket
- Controlling ownership of objects (Object Ownership)
- What is Amazon Macie
- Macie sensitive-data discovery jobs
- What is AWS Security Hub
- Amazon Macie pricing
- Rotating AWS KMS keys
- Deleting AWS KMS keys
- Using grants in AWS KMS
- AWS KMS policy conditions (kms:ViaService)
- Locking S3 objects (Object Lock)
- https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html