Skip to Content

DVA-C02: How to Find Lambda Function Logs in AWS

Learn how to troubleshoot your Lambda function code by examining the logs in AWS. Discover where the logs are stored and how to access them.

Question

An application uses Lambda functions to extract metadata from files uploaded to an S3 bucket; the metadata is stored in Amazon DynamoDB. The application starts behaving unexpectedly, and the developer wants to examine the logs of the Lambda function code for errors.

Based on this system configuration, where would the developer find the logs?

A. Amazon S3
B. AWS CloudTrail
C. Amazon CloudWatch
D. Amazon DynamoDB

Answer

C. Amazon CloudWatch

Explanation

The correct answer is C. Amazon CloudWatch.

This solution will allow the developer to find the logs of the Lambda function code for errors because Amazon CloudWatch is a service that collects, monitors, and analyzes metrics and logs from AWS resources and applications. By default, Lambda automatically sends logs from function code to CloudWatch Logs, which is a feature of CloudWatch that stores and accesses log data from AWS services and applications. The developer can use the CloudWatch console or API to view and search the logs of the Lambda function code for errors, as well as create alarms, dashboards, and metrics based on the log data.

The other options are not correct because:

  • Option A: Amazon S3 is a service that provides object storage for any type of data. The application uses S3 to store files uploaded by users, but not logs from Lambda function code. Therefore, the developer will not find the logs of the Lambda function code in S3.
  • Option B: AWS CloudTrail is a service that records AWS API calls and related events for AWS accounts and services. The application uses CloudTrail to track user activity and API usage, but not logs from Lambda function code. Therefore, the developer will not find the logs of the Lambda function code in CloudTrail.
  • Option D: Amazon DynamoDB is a service that provides a fully managed NoSQL database for applications. The application uses DynamoDB to store metadata extracted from files by Lambda functions, but not logs from Lambda function code. Therefore, the developer will not find the logs of the Lambda function code in DynamoDB.

Therefore, option C is the best solution for finding the logs of the Lambda function code for errors.

The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.

AWS Certified Developer - Associate DVA-C02 Exam Questions and Answers

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.