A global healthcare provider is designing a patient medical records portal. The portal application runs on Amazon ECS tasks inside an Application Account (Account 444444444444). The ECS tasks must upload scanned medical records directly to a centralized Amazon S3 bucket located in a dedicated Compliance Account (Account 888888888888). The solutions architect must design a security and compliance control structure that meets the following requirements:
1. All objects uploaded to the S3 bucket must be encrypted at rest.
2. The ECS tasks must be able to write records to the S3 bucket, but must not be able to read or delete any existing objects.
3. The Compliance Account must automatically own all uploaded records to prevent cross-account access delegation complexities.
4. Security auditors in the Compliance Account must be able to read and decrypt the records.
Which combination of configuration steps will meet these requirements in the most secure manner?
- In the Compliance Account, configure the S3 bucket's Object Ownership setting to Bucket Owner Enforced. Create a customer managed KMS key in the Compliance Account, and configure its key policy to allow the ECS task role in the Application Account permissions to perform kms:GenerateDataKey and kms:Decrypt, and allow auditors in the Compliance Account to perform kms:Decrypt. In the Compliance Account, update the S3 bucket policy to allow the ECS task role in the Application Account to perform s3:PutObject. In the Application Account, grant the ECS task role IAM permissions to perform s3:PutObject on the S3 bucket and kms:GenerateDataKey and kms:Decrypt on the KMS key.Answer
- BIn the Compliance Account, configure the S3 bucket's Object Ownership setting to Bucket Owner Enforced. Enable default S3 bucket encryption using the AWS managed key (aws/s3). Configure the S3 bucket policy to allow the ECS task role in the Application Account to perform s3:PutObject. In the Application Account, grant the ECS task role IAM permissions to perform s3:PutObject on the S3 bucket.
- CIn the Compliance Account, configure the S3 bucket's Object Ownership setting to Bucket Owner Enforced. Create a customer managed KMS key in the Compliance Account. Attach a Service Control Policy (SCP) to the Organizational Unit (OU) containing both accounts that allows the ECS task role to perform s3:PutObject on the S3 bucket and kms:GenerateDataKey on the customer managed key, without configuring individual IAM policies for the ECS task role in the Application Account.
- DIn the Compliance Account, configure the S3 bucket to allow public write access, and configure a customer managed KMS key. Configure the ECS tasks to write objects using the bucket-owner-full-control canned ACL, and configure the S3 bucket policy to trust the Application Account's root user, omitting specific IAM permissions for the ECS task role in the Application Account.