nerdexam
AmazonAmazon

SOA-C02 · Question #735

SOA-C02 Question #735: Real Exam Question with Answer & Explanation

The correct answer is A: Create a Lambda function that uses the PutRetentionPolicy operation to set the retention period to. Trigger a Lambda function via an EventBridge rule on the CreateLogGroup event, and have the function call PutRetentionPolicy to set 3 days. This automatically enforces the retention on every

Submitted by omar99· Mar 30, 2026

Question

A SysOps administrator is examining costs in a development account that is part of an organization in AWS Organizations. The account includes Amazon CloudWatch Logs log groups that are set to never expire. The log groups are associated with several AWS Lambda functions that are invoked by Amazon EventBridge rules. The SysOps administrator needs to implement a solution to automate a 3-day retention period for any log groups that are created in the future. Which solution will meet these requirements?

Options

  • ACreate a Lambda function that uses the PutRetentionPolicy operation to set the retention period to
  • BUse the AWS Config cw-loggroup-retention-period-check managed rule to set the retention period
  • CCreate a Lambda function that uses the PutRetentionPolicy operation to set the retention period to
  • DCreate an AWS CloudFormation template that uses the AWS::Logs::ResourcePolicy resource.

Explanation

Trigger a Lambda function via an EventBridge rule on the CreateLogGroup event, and have the function call PutRetentionPolicy to set 3 days. This automatically enforces the retention on every

Community Discussion

No community discussion yet for this question.

Full SOA-C02 PracticeBrowse All SOA-C02 Questions