A European Union public sector agency is designing a secure document archiving solution across a multi-account organization. The architecture includes a centralized Archive Account (account 111122223333) with an Amazon S3 bucket, and multiple departmental Agency Accounts. Applications in the Agency Accounts run on Amazon EC2 instances and must upload official records directly to the centralized S3 bucket.
To meet strict data sovereignty compliance, all uploaded objects must be encrypted using server-side encryption with AWS KMS (SSE-KMS) using a key managed by the security team in the Archive Account. The security team wants to ensure that:
1. Departmental applications can upload files only if they are encrypted with the approved key.
2. The Archive Account retains full control over the encryption key and the data.
3. The departmental applications cannot delete or modify archives once uploaded.
The security team creates a Customer Managed Key (CMK) in the Archive Account. How should the security team configure the policies to allow the Agency Account (account 444455556666) applications to upload encrypted documents to the S3 bucket?
- AConfigure the S3 bucket in the Archive Account to use the default AWS-managed key `aws/s3` for server-side encryption. In the Archive Account's S3 bucket policy, grant the Agency Account's IAM role (`AgencyUploadRole`) permissions for the `s3:PutObject` action. In the Agency Account, attach an IAM policy to the `AgencyUploadRole` that permits `s3:PutObject` on the S3 bucket and `kms:GenerateDataKey` on the `aws/s3` key resource.
- BCreate a Customer Managed Key (CMK) in the Archive Account and retain the default key policy. Attach a Service Control Policy (SCP) to the Organizational Unit (OU) containing both accounts that explicitly allows the `s3:PutObject`, `kms:GenerateDataKey`, and `kms:Decrypt` actions for all principals, assuming this grants the cross-account access without modifying the individual KMS key policy or local IAM roles.
- Create a Customer Managed Key (CMK) in the Archive Account. In the CMK's key policy, grant the Agency Account's IAM role (`AgencyUploadRole`) permissions for the `kms:GenerateDataKey` and `kms:Decrypt` actions. In the Archive Account's S3 bucket policy, grant the `AgencyUploadRole` permissions for the `s3:PutObject` action, with conditions enforcing encryption using the CMK. In the Agency Account, attach an IAM policy to the `AgencyUploadRole` that permits `s3:PutObject` on the S3 bucket and `kms:GenerateDataKey` and `kms:Decrypt` on the CMK.Answer
- DCreate a Customer Managed Key (CMK) in the Archive Account. In the CMK's key policy, grant the Agency Account's root user principal (`arn:aws:iam::444455556666:root`) permissions for the `kms:GenerateDataKey` and `kms:Decrypt` actions. In the Archive Account's S3 bucket policy, grant the Agency Account's root user principal permissions for the `s3:PutObject` action. Rely on this cross-account trust configuration alone and do not attach any local IAM policies to the `AgencyUploadRole` in the Agency Account.