aws|August 22, 2017|1 min read

Troubleshoot AWS Lambda unknown error!

TL;DR

If your Lambda silently dies with no error, check the timeout setting. Lambda kills the process when it exceeds the configured timeout, with no exception trace — just a silent stop.

Troubleshoot AWS Lambda unknown error!

After 2 days, there was my demo. I deployed my nodejs code on lambda function, and trying testing it. It abruptly stops in between, and no error or exception trace.

My application looked suspicious. I looked at my code, all looked good. I put a new try-catch statement, and some promised catch blocks. Deployed it again. Same behavior.

I started blaming newly developed components. Few days back, I incorporated newrelic components. I tried lot of modifications, debug statements, and even removed this component. But, still problem persists.

I tried running same application from my machine, it worked well. I wonder what is going on. I even thought of spinning an AWS EC2 instance, and try it there.

Problem

Each time, my application runs, and it stopped at one line only, with no trace, or error message. Troubleshoot AWS Lambda unknown error!

I was scanning through the configurations of lambda function. Suddenly, I found that the execution time value of lambda function was set to 1 min only.

Holy Crap!

I increased that time, and deployed my application again, it worked. My bad.

Tip for Lambda debugging

Always check lambda timeout value.

But

AWS people should show something in logs indicating that the app is shutting down due to timeout. It irked me a lot.

Related Posts

Python SMTP Email Code - Sender Address Rejected - Not Owned By User

Python SMTP Email Code - Sender Address Rejected - Not Owned By User

Introduction In a normal email sending code from python, I’m getting following…

How to upload files on AWS S3 by using curl, without having command line aws or other tool

How to upload files on AWS S3 by using curl, without having command line aws or other tool

Introduction There were few files that I need to take backup from a machine that…

Static Website Hosting with AWS S3 and Cloudflare

Static Website Hosting with AWS S3 and Cloudflare

Static websites have several advantages over dyanamic websites. If you are…

How to Fix Drupal Mysql error - Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes

How to Fix Drupal Mysql error - Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes

Introduction While this topic may applicable to all mysql/mariadb users who…

Solving Jboss Wildfly Oracle JDBC driver problem, with Dockerfile

Solving Jboss Wildfly Oracle JDBC driver problem, with Dockerfile

Assuming your web application is using oracle, and you are deploying your app on…

React JS router not working on Nginx docker container

React JS router not working on Nginx docker container

Problem Statement I developed a simple ReactJS application where I have used…

Latest Posts

Deep Dive on Elasticsearch: A System Design Interview Perspective

Deep Dive on Elasticsearch: A System Design Interview Perspective

“If you’re searching, filtering, or aggregating over large volumes of semi…

Deep Dive on Apache Kafka: A System Design Interview Perspective

Deep Dive on Apache Kafka: A System Design Interview Perspective

“Kafka is not a message queue. It’s a distributed commit log that happens to be…

Deep Dive on Redis: Architecture, Data Structures, and Production Usage

Deep Dive on Redis: Architecture, Data Structures, and Production Usage

“Redis is not just a cache. It’s a data structure server that happens to be…

Deep Dive on API Gateway: A System Design Interview Perspective

Deep Dive on API Gateway: A System Design Interview Perspective

“An API Gateway is the front door to your microservices. Every request walks…

REST API Design: Pagination, Versioning, and Best Practices

REST API Design: Pagination, Versioning, and Best Practices

Every time two systems need to talk, someone has to design the contract between…

Efficient Data Modelling: A Practical Guide for Production Systems

Efficient Data Modelling: A Practical Guide for Production Systems

Most engineers learn data modelling backwards. They draw an ER diagram…