
AWS Certified Developer - Associate
Get started today
Ultimate access to all questions.
An IT company recently transitioned to a serverless architecture on the AWS Cloud, utilizing Lambda functions for their compute layer. The engineering managers now need an effective method to actively troubleshoot and resolve any failures occurring within the Lambda functions.
As an AWS Certified Developer Associate, which of the following solutions would you recommend for this scenario?
An IT company recently transitioned to a serverless architecture on the AWS Cloud, utilizing Lambda functions for their compute layer. The engineering managers now need an effective method to actively troubleshoot and resolve any failures occurring within the Lambda functions.
As an AWS Certified Developer Associate, which of the following solutions would you recommend for this scenario?
Explanation:
"The developers should insert logging statements in the Lambda function code which are then available via CloudWatch logs"
When you invoke a Lambda function, two types of error can occur. Invocation errors occur when the invocation request is rejected before your function receives it. Function errors occur when your function's code or runtime returns an error. Depending on the type of error, the type of invocation, and the client or service that invokes the function, the retry behavior, and the strategy for managing errors varies.
Lambda function failures are commonly caused by:
Permissions issues Code issues Network issues Throttling Invoke API 500 and 502 errors
You can insert logging statements into your code to help you validate that your code is working as expected. Lambda automatically integrates with CloudWatch Logs and pushes all logs from your code to a CloudWatch Logs group associated with a Lambda function, which is named /aws/lambda/