Ultimate access to all questions.
In a serverless application using AWS Lambda and AWS CloudFormation, how can a developer ensure the application has runtime access to the name of a pre-created log group in Amazon CloudWatch Logs?
Explanation:
The correct answer is D. By passing the log group's Amazon Resource Name (ARN) as an environment variable to the Lambda function, the developer ensures that the Lambda function can access the log group name at runtime. This approach is straightforward and maintains flexibility, allowing the application to dynamically reference resources without hardcoding values. Options A, B, and C do not provide a direct or secure way to pass the log group name to the Lambda function at runtime.