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

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Most developers use Claude Code like a search engine — ask a question, get an…

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Every office lobby has the same problem: a visitor walks in, nobody’s at the…

Server Security Best Practices — Complete Hardening Guide for Production Systems

Server Security Best Practices — Complete Hardening Guide for Production Systems

Every breach post-mortem tells the same story: an unpatched service, a…

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

If you’re a Senior Engineer (L5) preparing for Staff (L6+) roles at MAANG…

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF have been in the OWASP Top 10 for over a decade. They’re among the…

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

The OWASP Top 10 is the industry standard for web application security risks. If…