A SysOps administrator in a production AWS account (Account A: `111122223333`) is configuring cross-account logging. The administrator wants to stream application logs from a CloudWatch log group named `AppLogs` in Account A to a centralized CloudWatch Logs destination named `CentralLogDestination` in a security account (Account B: `444455556666`).
The administrator runs the following AWS CLI command in Account A:
bash
aws logs put-subscription-filter \
--log-group-name "AppLogs" \
--filter-name "CentralFilter" \
--filter-pattern "" \
--destination-arn "arn:aws:logs:us-east-1:444455556666:destination:CentralLogDestination"
The command fails with the following error:
`An error occurred (AccessDeniedException) when calling the PutSubscriptionFilter operation.`
Which configuration issue is the root cause of this failure?
- The access policy of the destination CentralLogDestination in Account B does not grant the logs:PutSubscriptionFilter permission to Account A (111122223333).Cevap
- BThe IAM user executing the command in Account A lacks the iam:PassRole permission to pass the target IAM role to the log group.
- CThe IAM role associated with CentralLogDestination in Account B has an incorrect trust policy that does not allow the logs.amazonaws.com service principal to assume it.
- DThe KMS key policy used to encrypt the Kinesis Data Stream destination in Account B does not grant decrypt permissions to the AWS CLI user in Account A.