A Deep Dive into Serverless Tracing with AWS X Ray & Lambda. Over the past few weeks I’ve been experimenting with building a Serverless API on AWS with the goal of having everything needed to run a production system. One necessary piece was distributed tracing. While I’d seen a bit of what some non-AWS options had to offer, the extra cost of the services themselves, along with actually getting the data to them, was a bit prohibitive for what I imagined should be possible (and cheaper) with only AWS, which brought me to X Ray.
Over the past few weeks I’ve been experimenting with building a Serverless API on AWS with the goal of having everything needed to run a production system. One necessary piece was distributed tracing. While I’d seen a bit of what some non-AWS options had to offer, the extra cost of the services themselves, along with actually getting the data to them, was a bit prohibitive for what I imagined should be possible (and cheaper) with only AWS, which brought me to X Ray. So, I wanted to see if I could use AWS X Ray to get everything I wanted out of a tracing solution. First, I’ll set some expectations of what I need in a production tracing solution as a goal to orient the research process.
First, a standard Serverless project setup and code walk-through. By the way, all the code I used in this post is available here.
npm i -g serverless
sls create --template aws-nodejs --path lambda-demo-api
cd lambda-demo-api && npm init && npm i --save-dev serverless-offline
The file structure of the lambda we’re going to deploy looks like this:
├── anotherFile.js
├── index.js
├── logger.js
├── node_modules
├── package-lock.json
├── package.json
├── serverless.yml
└── utils.js
I’ll be explaining each of these files later on. For now, let’s check out the initial serverless config.
In this article, I will show you how to invoke a lambda function from another lambda function.
Serverless Express enables you to easily host Express.js APIs on AWS Lambda and AWS HTTP API. Here is how to get started and deliver a Serverless Express.js based API with a custom domain, free SSL certificate and much more!
This article explains how to add real time notifications using Slack, ChatOps, Lambda and NodeJS. This article explains how to inject an error reporting module using ChatOps and how it helps organizations react faster to issues arising from applications that were running inside AWS Lambda Functions. In this demo, I will be using NodeJS and will utilize Slack to deliver alarms to important stakeholders. Reporting Errors via ChatOps using AWS Lambda & NodeJS
Learn how to deploy a simple serverless API with Node.js, AWS Lambda, and the Serverless framework. Make your NodeJS Express API run serverless and deploy it to AWS
I wanted to start a serverless project, and one of the primary headaches aside from architecting the workflow and deciding which lambda functions need to be created is a simple and yet effective CICD workflow.