Duncan Leung

Aws-lambda

01

Export Serverless Framework Environment Variables to a Local .env File

serverlessaws-lambdaaws-cloudformation

Bridging CloudFormation-generated runtime values - DynamoDB table names, API Gateway URLs, ARNs that do not exist until deployment - into a local .env file using the serverless-export-env plugin.

02

AWS SDK v2 with async/await in Node.js Lambda Handlers

serverlessaws-lambdanodejs

Bridging callback-style AWS SDK v2 methods with async/await in Node.js Lambda handlers - the .promise() method, sequential and parallel SDK calls, and the init-outside-handler pattern for cached Promises.

03

When Direct Lambda-to-Lambda Invocation Is OK

serverlessaws-lambda

AWS docs call Lambda-to-Lambda invocation an anti-pattern, but there are specific cases where direct invoke is the right call. A walkthrough of the real costs, the cases where they apply, the cases where they do not, and the alternatives.

04

Serverless Framework Commands by Workflow

serverlessaws-lambda

A practical cheatsheet for the Serverless Framework CLI - organized by workflow phase (bootstrap, develop, deploy, invoke, inspect, rollback, remove) instead of alphabetically.

05

A Least-Privilege IAM Strategy for Serverless Framework Deployments

serverlessaws-iamaws-lambda

Two practical patterns for scoping down the IAM permissions used by the Serverless Framework CLI when deploying - bottom-up gradual scoping, and the top-down 'dedicated deployer' pattern using a dev account as a permission discovery sandbox.

06

Serverless Testing Strategy: Test Integrations and IAM Surface

serverlessaws-lambdaaws-iam

Most serverless bugs don't live in your code - they live at integration points and in IAM config. Here's why unit tests miss them and what to test instead.

07

Reducing AWS Lambda Cold Start Latency in Node.js

serverlessaws-lambdaperformance

A practical guide to reducing AWS Lambda cold start latency in Node.js - the anatomy of a cold start, six concrete optimizations from SDK tree-shaking to HTTP keep-alive, common myths (VPC and Layers), and when to reach for Provisioned Concurrency.