| by Arround The Web | No comments

How to Debug AWS Lambda

Amazon Web Services provides the Lambda service that runs back-end code to provide a great experience to users. Events can be a file/folder upload to Amazon S3 buckets or an update to DynamoDB. Lambda handles all the capacity scaling patching and the administration of the infrastructure. This post will discuss the process of debugging AWS lambda.

Let’s start with how to debug AWS lambda:

How to Debug AWS Lambda

To debug AWS lambda, visit the AWS lambda console and create a new function by clicking on the “Create function” button:

On this page, select the Author from Scratch and type the name of the function:

Scroll down the page and select the language for the runtime and its architecture. After that, click on the “Create function” button:

Once the lambda function is created, it will look like the following screenshot:

Add a layer to the lambda function by scrolling down to the bottom of the page and clicking on the “Add a layer” button in the layers section:

Configure the layer to be added to the lambda function and click on the “Add” button:

After that, select the code section and click on the “Test” button to debug the AWS lambda function:

After the testing process, the following output will be displayed in the execution result tab:

You have successfully debugged the AWS lambda function:

Conclusion

Debugging AWS lambda can be done very easily with a simple process. Simply create a lambda function from the AWS Lambda console page and configure the settings for the function. After that, add layers to the function to trigger some events so it can be tested for bugs. In the code source section, use the “Test” button to debug the AWS lambda function.

Share Button

Source: linuxhint.com

Leave a Reply