Free AWS DVA-C01 Actual Exam Questions - Question 12 Discussion
will use AWS Cloud Formation to deploy the application. The application will write logs to Amazon
3loudWatch Logs. The developer has created a log group in a Cloud Format ion template for the
application to use. The developer needs to modify the CloudFormation template to make the name
of the log [jroup available to the application at runtime.
Which solution will meet this requirement?
B tbh can be ruled out since Lambda doesn't use user data like EC2 instances do, so that won't help pass the log group name. A and C are more about structuring templates or static mappings, not for runtime values. D is the only one that makes sense because environment variables are specifically designed to provide config info like log group names to Lambda functions while they run. Passing the ARN isn't necessary if the function just needs the name, so setting an env var with the log group name directly fits perfectly here.
B tbh doesn’t fit since user data is for EC2 instances, not Lambda functions. A is off because AWS::Include is for including template snippets, not passing runtime values. C with Mappings is static, not dynamic at runtime. D makes the most sense since environment variables are designed for passing config data like log group names to Lambda functions during execution.
It’s D because environment variables let Lambda access values dynamically during execution.
D Environment variables are the go-to way for Lambda to get config info at runtime, so passing the ARN here makes sense. The other options don’t really fit how Lambda configs usually work.
It’s D, environment variables are perfect for runtime access to config values.
Option D looks like the best fit since passing the ARN as an environment variable makes it accessible to the function at runtime.