A company wants to consolidate application logs from Amazon CloudWatch Logs across multiple AWS accounts in an AWS Organization into a centralized Amazon S3 bucket located in a dedicated Security account. The security team wants to stream these logs in near-real-time using Amazon Kinesis Data Firehose in the Security account, and they need to ensure secure cross-account delivery. Which two steps must the solutions architect take to configure this cross-account log aggregation topology? (Select TWO.)
- In the Security account, create a CloudWatch Logs destination that points to the Kinesis Data Firehose delivery stream and references an IAM role that allows CloudWatch Logs to write to the stream. Configure a destination policy on the CloudWatch Logs destination that grants the member accounts permission to perform the logs:PutSubscriptionFilter action.Cevap
- In each member account, create a CloudWatch Logs subscription filter on the target application log groups, specifying the Amazon Resource Name (ARN) of the CloudWatch Logs destination in the Security account as the target.Cevap
- CIn the Security account, configure the S3 bucket policy of the destination bucket to grant logs.amazonaws.com and the member account IDs direct s3:PutObject permissions, and configure the source accounts to write to the S3 bucket directly.
- DIn the Security account, encrypt the Kinesis Data Firehose delivery stream using the AWS-managed KMS key (aws/kinesis) and modify its key policy to allow the member account IAM roles to perform kms:GenerateDataKey and kms:Decrypt actions.
- EAttach a Service Control Policy (SCP) at the root of the AWS Organization that grants member accounts the logs:PutSubscriptionFilter permission to automatically push all CloudWatch log groups to the central destination without local configuration.
Cevap
The correct configurations involve creating a CloudWatch Logs destination in the Security account that points to the Kinesis Data Firehose delivery stream, configuring a destination policy allowing the source accounts to execute logs:PutSubscriptionFilter, and creating a subscription filter on the target log groups in the member accounts referencing the Security account's destination ARN.
Setting up a CloudWatch Logs destination in the Security account with a resource policy allowing logs:PutSubscriptionFilter, along with configuring local subscription filters in the source accounts targeting the destination's ARN, correctly implements the cross-account subscription filter architecture. The destination is associated with an IAM service role that authorizes CloudWatch Logs to write to Kinesis Data Firehose.
Adım Adım Çözüm
Anahtar Kavram
Cross-account log aggregation with CloudWatch Logs requires establishing a CloudWatch Logs Destination in the receiving account, securing it via a resource-based destination policy, and creating local subscription filters targeting that destination in the sending accounts.