In Part 1 of Developing on AWS Lambda, I covered the basics of developing Lambda functions with the AWS NodeJS SDK. This post was written with the NodeJS SDK version 2 in mind. In December 2020, there was a new major release of the SDK: Version 3.


Let’s look at some ways you can create APIs.

Vanilla Cloudformation

You can create API Gateway deployments with vanilla CloudFormation. The resources are AWS::ApiGateway::RestApi and AWS:ApiGateway::HttpApi. This is my least favorite way to create APIs. You have to define every method, permission, integration, and route. It’s extremely verbose and difficult to manage…


I’m super excited about the new feature for EventBridge called API Destinations. It lets you emit native events that occur in your AWS environment to any HTTP destination. Read more about the service via the AWS launch blog(written by James Beswick)!

There are two features that make this amazingly powerful:


Amazon API Gateway HTTP APIs supports a new type of authorizer called JWT Authorizer. You deliver JWT tokens to API Gateway and it verifies them with the configured issuer. It’s fairly straight forward to configure.

  1. Identify the source for the incoming token that has your identity info. …

Most people find Amazon Cognito confusing. The learning curve is steep and there are service constraints you may need to work around. If you are deciding if Cognito will work as your IDP, the main constraint to consider is:

  • Do you need to go Multi-Region? If yes, Cognito is not…

I recently did a deep dive into writing Java based AWS Lambda functions for Amazon API Gateway payloads. Special thanks to Heeki Park for helping figure this out! Check out his Medium for awesome AWS tips. Here’s the things you should know and will save you time and headache:

You…


Operating multiple accounts is an AWS best practice — it helps shard your work, distribute limits, and better segment your environments. It can be challenging to build APIs that consume resources in different accounts, but you have a few options:

  1. VPC peer or use Transit Gateway to enable communication between…

A quick intro to Provisioned Concurrency

At re:Invent 2019, AWS added a flavor of AWS Lambda that lets you pre-provision Lambda capacity ahead of time — its called Provisioned Concurrency (PC). You tell AWS how much concurrency you want to keep warm and AWS will handle everything for you. …


Cloudwatch Logs Insights is the most powerful, easiest way to produce actionable intelligence from your out of the box AWS Lambda Logs. I feel like most people overlook Cloudwatch Logs Insights when it comes time to analyze and review your Lambda performance. …


Control your Lambda Logging Costs

By default, a Lambda function will emit all of the standard out generated during the invocation to a CloudWatch log (CWL) group with a CWL group named in this format: /aws/lambda/[Name of function here]. CWL groups by default are stored indefinitely — which means you will incur costs , measured…

George Mao

AWS Serverless Specialist. I’ll post short, high value tips & tricks for all things Serverless. Ping me if you want to talk about anything :)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store