TerraGrid Energy is designing a new compliance monitoring system. Application servers run under an IAM role in a Production Account (Account A) and need to write telemetry logs containing sensitive customer data to an Amazon S3 bucket located in a centralized Compliance Account (Account B). All logs must be encrypted at rest using an encryption key managed in Account B. The security team requires that the encryption key policy enforces the principle of least privilege. Which two actions should the solutions architect take to configure this security control? (Select TWO.)
- Create a customer managed key (CMK) in Account B, and configure the key policy to grant the IAM role in Account A permissions for the kms:GenerateDataKey and kms:Decrypt actions.Cevap
- Configure the S3 bucket policy in Account B to allow the IAM role in Account A to perform the s3:PutObject action, and attach an IAM policy to the application role in Account A that grants access to the S3 bucket and the CMK in Account B.Cevap
- CUse the default AWS-managed KMS key for Amazon S3 (aws/s3) in Account B, and configure Account A's IAM policy to reference this key for encryption during S3 uploads.
- DAttach a Service Control Policy (SCP) to the Organizational Unit (OU) containing Account A that allows cross-account S3 and KMS access, eliminating the need to attach local IAM policies to the application role in Account A.
- EConfigure the S3 bucket policy in Account B to trust Account A using the aws:PrincipalOrgID condition, and omit the s3:PutObject permission from Account A's IAM policy to rely entirely on the bucket policy for authorization.
Cevap
Create a customer managed key (CMK) in the compliance account (Account B), configure the key policy to grant the application's IAM role in Account A permissions for the kms:GenerateDataKey and kms:Decrypt actions, update the destination S3 bucket policy in Account B to allow the role to perform the s3:PutObject action, and attach an IAM policy to the role in Account A granting access to the S3 bucket and the CMK in Account B.
To secure cross-account S3 data writing with KMS encryption, a Customer Managed Key (CMK) must be created in the destination account because AWS-managed keys cannot be shared across accounts. The CMK's key policy must trust the source IAM role. Additionally, access must be authorized symmetrically: the destination bucket policy must permit the source IAM role, and the source IAM role must have an IAM policy allowing it to perform the upload and use the external CMK.
Adım Adım Çözüm
Anahtar Kavram
Cross-account security controls involving S3 and KMS require authorization in the KMS key policy, the S3 bucket policy, and the client's local IAM policy, utilizing Customer Managed Keys (CMKs) to enable cross-account policy sharing.
Tahmini Süre:2m 0s