{
  "id": 21455436,
  "title": "How to Test AWS Lambda Locally Using AWS Emulator",
  "url": "https://urgent.news/2026/11/23/how-to-test-aws-lambda-locally-using-aws-emulator",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-23T19:49:37.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/aws-builders/how-to-test-aws-lambda-locally-using-aws-emulator-47f4"
  },
  "original_language": "en",
  "account": "The article discusses how to test AWS Lambda applications locally using the AWS Emulator, a free, open-source emulator of AWS APIs that runs on a local machine. The emulator eliminates the need for deploying code to AWS before testing, as it allows AWS CLI and SDK calls to be made to a local endpoint instead of the actual AWS services. The article covers the steps to test an API Gateway → Lambda → DynamoDB application locally with the AWS Emulator and Docker, and shares the author's experience with the emulator.\n\nTo begin, you need to build and run the emulator in Docker. The emulator does not have a console or UI, so you start it by running it as a Docker container. The Dockerfile includes instructions to install the emulator, set the necessary environment variables, and expose port 9297 for communication with AWS tools. On Apple silicon devices, you need to use the aarch64 version of the emulator package.\n\nOnce the emulator is running, you need to point your AWS CLI and SDKs at it. You create a script to unset the default AWS credentials and source it before running any AWS CLI, SDK, or test commands. This ensures that the emulator's credentials and configuration are used instead of AWS's.\n\nThe article includes a small API that demonstrates how to test an API Gateway, Lambda, and DynamoDB integration. The API has three routes: POST /notes creates a note, GET /notes/{id} retrieves a note, and GET /notes lists all notes. The API is built using AWS CDK, and all components except the client run inside the emulator.\n\nPrerequisites for following the article include Docker, AWS CLI v2, AWS CDK CLI, Node.js 22, and Python 3.12. You should also have no existing AWS account, as the emulator does not require one. The article covers the steps to build and run the emulator in Docker, point your AWS CLI and SDKs at the emulator, and test the API locally using the emulator.",
  "summary": "Over the years building on AWS, one of my biggest challenges has been local testing. It takes a lot of hard work to get right. Until now, if you have built anything on Lambda, you know the loop: change one line, deploy, wait, test, open CloudWatch, repeat. On November 11, 2026, AWS released AWS Emulator , a free, open-source emulator of the AWS APIs that runs on your own machine. It takes the…",
  "key_points": [
    "AWS Emulator allows testing AWS Lambda applications locally without deploying code.",
    "Docker container runs the emulator, exposing port 9297 for AWS tool communication.",
    "API Gateway, Lambda, and DynamoDB integration tested using the emulator with API built via AWS CDK."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}