An IoT service provider is designing a new multi-tenant telemetry ingestion platform on AWS. The core ingestion application runs on Amazon ECS in a shared services AWS account (Account A) and must write incoming telemetry data directly to Amazon S3 buckets located in various customer-owned AWS accounts. A key requirement is that a retail customer (using Account B) must control the encryption keys used for their data at rest and have the ability to immediately revoke the ingestion application's write access to their bucket without modifying any S3 bucket policies. Which of the following configuration strategies meets these security and architectural requirements?
- AConfigure the S3 bucket in Account B to use default Server-Side Encryption with AWS KMS (SSE-KMS) utilizing the AWS managed key for S3 (aws/s3) in Account B. Configure the S3 bucket policy in Account B to grant s3:PutObject permissions to the ingestion IAM role from Account A. In Account A, attach an IAM policy to the ingestion role that allows s3:PutObject on Account B's bucket and kms:GenerateDataKey on the aws/s3 key in Account B.
- BCreate a Customer Managed Key in Account B. Attach a Service Control Policy (SCP) to the Organizational Unit (OU) containing Account B that explicitly allows s3:PutObject and kms:GenerateDataKey actions for the principal of the ingestion IAM role in Account A. Rely on this SCP to grant the cross-account permissions and enable write access, allowing the customer to revoke access by detaching the SCP.
- Configure the S3 bucket in Account B to use default Server-Side Encryption with AWS KMS (SSE-KMS) utilizing a Customer Managed Key (CMK) created in Account B. Update the CMK key policy in Account B to grant kms:GenerateDataKey permissions to the ingestion IAM role from Account A. Configure the S3 bucket policy in Account B to grant s3:PutObject permissions to the ingestion IAM role. In Account A, attach an IAM policy to the ingestion role that allows s3:PutObject on Account B's bucket and kms:GenerateDataKey on Account B's CMK.Answer
- DCreate a Customer Managed Key in Account B and configure its key policy to grant the ingestion IAM role in Account A the kms:GenerateDataKey permission. Configure the S3 bucket policy in Account B to restrict access using organizational conditions (aws:PrincipalOrgID) to trust Account A's organization, but omit the specific ingestion IAM role principal from the S3 bucket policy statements, relying on the organizational condition to permit the write access.
Answer
Configure the S3 bucket in Account B to use a Customer Managed Key (CMK), grant the ingestion role in Account A both s3:PutObject and kms:GenerateDataKey permissions via Account B's resource policies, and configure corresponding IAM policies in Account A to permit these actions.
The correct strategy involves configuring the S3 bucket in the customer's account (Account B) to encrypt data using a Customer Managed Key (CMK). By granting the ingestion IAM role in Account A permission to generate data keys on Account B's CMK, and granting write access via the S3 bucket policy, the ingestion role is authorized to perform cross-account writes. The customer can immediately revoke access by disabling the CMK or changing the key policy, which blocks key generation and halts S3 uploads without needing to modify S3 bucket policies.
Step-by-Step Solution
Key Concept
Cross-account KMS and S3 permissions delegation