A SysOps Administrator is using AWS Systems Manager Run Command to execute a custom shell script on a group of Amazon EC2 instances to perform a security configuration change. The target instances are located in a private subnet, have the SSM Agent installed and running, and have an IAM instance profile with the AmazonSSMManagedInstanceCore managed policy attached. The administrator specifies an encrypted Amazon S3 bucket to store the command execution logs. The S3 bucket is encrypted using a Customer Managed Key (CMK) in AWS KMS. Although the Run Command completes successfully on the instances, the administrator finds that no logs are delivered to the S3 bucket. A check of the SSM Agent log on the instances reveals an access denied error when attempting to upload the log files. Which action should the SysOps Administrator take to resolve this issue?
- Attach a custom IAM policy to the EC2 instances' IAM role that grants kms:GenerateDataKey permissions for the Customer Managed Key, and verify that the KMS key policy permits these actions for the role.Cevap
- BAttach an IAM policy to the EC2 instances' IAM role that grants kms:GenerateDataKey permissions for the Customer Managed Key, without updating the KMS key policy which restricts key access to the account root.
- CAttach a custom IAM policy to the SysOps Administrator's IAM user that grants iam:PassRole permissions for the EC2 instances' IAM role to be passed to the Systems Manager service.
- DConfigure a patch group tag key on the target instances that matches the custom SSM document and verify that the baseline is associated.