An administrator is troubleshooting an application running on an Amazon EC2 instance that needs to decrypt sensitive database backups retrieved from an Amazon S3 bucket. The backups are encrypted using a customer managed KMS key. Although the administrator has attached an IAM policy to the EC2 instance's IAM role that grants `kms:Decrypt` permissions for the key's Amazon Resource Name (ARN), the application still receives an Access Denied error when attempting to decrypt.
Which of the following configuration changes or verifications must the administrator perform to resolve this issue? (Select TWO.)
- Verify that the KMS key policy contains a statement that allows the EC2 instance's IAM role, or the account's root principal, to perform the `kms:Decrypt` action.Cevap
- Verify that the customer managed KMS key is in the Enabled state and has not been disabled or scheduled for deletion.Cevap
- CAdd a statement to the EC2 instance's IAM policy to explicitly override the KMS key policy, as IAM permissions automatically take precedence over key policies.
- DAssociate the subnet's route table with an AWS KMS gateway VPC endpoint to route decryption requests privately to KMS.
- EAttach an IAM policy to the EC2 instance's IAM role that grants `iam:PassRole` permissions for the customer managed KMS key.
Cevap
To resolve the decryption failure, the administrator must verify that the KMS key policy permits access (either directly or via IAM delegation) and ensure that the key is in the Enabled state.
The correct configurations involve ensuring that the key policy delegates access to IAM policies or the specific principal, and that the key is in the Enabled state. For customer managed keys, the key policy is the ultimate authority; IAM policies cannot grant access to a KMS key unless the key policy explicitly allows it (often by granting access to the root account principal). Furthermore, a KMS key must be enabled to perform cryptographic operations like decryption.
Adım Adım Çözüm
Anahtar Kavram
Understanding KMS key policy precedence and key state lifecycle for cryptographic operations.