A SysOps administrator has configured an Amazon CloudWatch alarm to monitor the CPU utilization of an Auto Scaling group. The alarm is configured to send notifications to an Amazon SNS topic when the CPU utilization exceeds . The SNS topic is encrypted using a customer managed AWS KMS key. During a load test, the CPU utilization exceeded the threshold, and the alarm state changed to ALARM, but no notifications were sent.
Which TWO actions should the administrator take to resolve this issue? (Select TWO.)
- Modify the AWS KMS key policy to grant the Amazon CloudWatch service principal (cloudwatch.amazonaws.com) permissions to execute the kms:Decrypt and kms:GenerateDataKey actions.Cevap
- Modify the Amazon SNS topic access policy to grant the Amazon CloudWatch service principal (cloudwatch.amazonaws.com) permissions to execute the sns:Publish action.Cevap
- CEnable CloudWatch Detailed Monitoring on the Amazon EC2 instances to reduce the metric granularity from minutes to minute.
- DCreate a custom IAM role with iam:PassRole permissions and attach it to the CloudWatch alarm to authorize it to assume the execution role.
- ECreate an Amazon EventBridge rule that triggers a Systems Manager Automation runbook to publish messages to the SNS topic when the CloudWatch alarm enters the ALARM state.
Cevap
The administrator must modify the AWS KMS key policy to allow the CloudWatch service principal to perform the kms:Decrypt and kms:GenerateDataKey actions, and modify the Amazon SNS topic access policy to allow the CloudWatch service principal to perform the sns:Publish action.
To resolve the notification failure, the CloudWatch service principal must be granted explicit permissions on both the target resource and its encryption key. The configuration requires modifying the KMS key policy to permit the CloudWatch service principal (`cloudwatch.amazonaws.com`) to execute both `kms:Decrypt` and `kms:GenerateDataKey`. Additionally, the SNS topic access policy must grant `sns:Publish` access to `cloudwatch.amazonaws.com` so CloudWatch can deliver the alert messages.
Adım Adım Çözüm
Anahtar Kavram
Permissions required for Amazon CloudWatch to publish to encrypted Amazon SNS topics