A logistics enterprise is building a new supply-chain tracking platform. The architecture stores sensitive transaction logs in an Amazon S3 bucket within a dedicated Storage Account. An analytics application running on Amazon ECS tasks in a separate Processing Account needs to read and write objects in this S3 bucket. All data stored in the S3 bucket must be encrypted at rest using an AWS KMS key. The design must adhere to the principle of least privilege while enabling secure cross-account access. Which design strategy meets these requirements?
- Encrypt the S3 bucket with a Customer Managed Key (CMK) in the Storage Account. Configure the CMK key policy to allow the Processing Account's ECS task role kms:Decrypt and kms:GenerateDataKey permissions. Update the S3 bucket policy to allow the ECS task role s3:GetObject and s3:PutObject permissions. Attach an IAM policy to the ECS task role in the Processing Account that allows S3 and KMS actions on these resources.Cevap
- BEncrypt the S3 bucket using the default AWS managed key (aws/s3). Configure the S3 bucket policy to allow the Processing Account's ECS task role s3:GetObject and s3:PutObject permissions. Attach an IAM policy to the ECS task role in the Processing Account that allows S3 and KMS actions on these resources.
- CEncrypt the S3 bucket with a Customer Managed Key (CMK) in the Storage Account. Apply a Service Control Policy (SCP) at the Organizational Unit level that grants the Processing Account's ECS task role access to the S3 bucket and the CMK. Avoid modifying the CMK key policy or the S3 bucket policy in the Storage Account.
- DEncrypt the S3 bucket with a Customer Managed Key (CMK) in the Storage Account. Configure the CMK key policy to allow the Processing Account's ECS task role kms:Decrypt and kms:GenerateDataKey permissions. Attach an IAM policy to the ECS task role in the Processing Account that allows S3 and KMS actions on the storage resources, omitting the S3 bucket policy to rely on IAM authority.
Cevap
Encrypt the S3 bucket with a Customer Managed Key (CMK) in the Storage Account. Configure the CMK key policy to allow the Processing Account's ECS task role kms:Decrypt and kms:GenerateDataKey permissions. Update the S3 bucket policy to allow the ECS task role s3:GetObject and s3:PutObject permissions. Attach an IAM policy to the ECS task role in the Processing Account that allows S3 and KMS actions on these resources.
The correct strategy uses a Customer Managed Key (CMK) because its key policy can be configured to delegate permissions to an external account. The security design correctly requires permissions on the S3 bucket policy (granting write/read), the KMS key policy (granting decrypt/generate data key), and the client-side IAM policy (granting the ECS task role access to the resources).
Adım Adım Çözüm
Anahtar Kavram
Cross-account access to encrypted S3 resources requires coordination of the S3 bucket policy, the KMS key policy (which must be a Customer Managed Key), and the IAM policy of the calling principal.
Tahmini Süre:2m 0s