A SysOps Administrator is configuring AWS CloudTrail to deliver log events to Amazon CloudWatch Logs for real-time compliance monitoring. The administrator needs to ensure that the integration is secure and log delivery is successful.
Which two configuration steps must the administrator perform to achieve this? (Select TWO.)
- Create an IAM role with a trust policy that allows the CloudTrail service principal to assume it, and attach a permissions policy allowing the logs:CreateLogStream and logs:PutLogEvents actions.Cevap
- Specify a target CloudWatch Logs log group that resides in the same AWS Region as the CloudTrail trail.Cevap
- CEnable detailed monitoring on the CloudTrail trail to decrease the delivery interval of events to CloudWatch Logs to one minute.
- DConfigure an Amazon EventBridge rule to route CloudTrail API events directly to the CloudWatch Logs log group without requiring a service role.
- EGrant the iam:PassRole permission directly to the CloudTrail service principal within the IAM role's permissions policy.
Cevap
The correct configurations are to create an IAM role with a trust policy that allows the CloudTrail service principal to assume it (with permissions for creating log streams and putting log events) and to specify a CloudWatch Logs log group in the same AWS Region as the CloudTrail trail.
The correct configuration requires establishing a cross-service trust and permission model. First, the CloudWatch Logs log group must exist in the same region as the CloudTrail trail. Second, an IAM role must be configured with a trust policy allowing the CloudTrail service principal to perform the assume role action, along with a permissions policy that grants the ability to create log streams and write log events into that specific log group.
Adım Adım Çözüm
Anahtar Kavram
AWS CloudTrail integration with CloudWatch Logs requires a same-region destination log group and an IAM service role that trusts CloudTrail to write log streams.