An application running on an Amazon EC2 instance in Account A (111122223333) uses an IAM role named AppReaderRole. The application needs to read and decrypt files stored in an Amazon S3 bucket in Account B (444455556666). The S3 bucket is configured with server-side encryption using a customer managed key (CMK) in Account B. The AppReaderRole in Account A has been granted s3:GetObject on the S3 bucket and kms:Decrypt on the CMK via its local IAM policy. The S3 bucket policy in Account B allows s3:GetObject to the AppReaderRole. However, when the application attempts to download an encrypted file, it receives an AccessDenied error from KMS. The KMS key policy in Account B contains only the default statement that allows all actions to Account B's root principal. Which action should the SysOps Administrator take to resolve this issue?
- Modify the KMS key policy in Account B to allow the AppReaderRole in Account A (or the Account A root principal) to perform the kms:Decrypt action.Answer
- BModify the S3 bucket policy in Account B to grant kms:Decrypt permissions on the customer managed key to the AppReaderRole in Account A.
- CChange the S3 bucket encryption to use the default AWS managed key (aws/s3) for SSE-KMS, and rely on the existing IAM policy in Account A for decryption.
- DAttach an IAM policy to the EC2 instance's IAM role in Account A that allows it to assume a custom key administration role in Account B.