Testing your serverless applicationsEmulators1 min

Emulators are desktop applications that resemble services in the cloud. They have similar API’s to their cloud based counterparts and provide similar return values. The AWS Serverless Application Model (SAM) provides emulators for API Gateway (sam local start-api) and AWS Lambda (sam local invoke). Other examples of AWS supported emulators include Amazon DynamoDB Local and AWS Step Functions Local. External vendors like LocalStack also provide a broad set of service emulators.

While emulators can enable fast local development iterations, they also have several limitations. Emulators can require a non-trivial amount of setup and configuration effort. Emulated features and API’s typically lag service counterparts. Service aspects such as IAM policies and quotas may not be emulated. Finally, not all services will have emulators, so developers basing a testing strategy on emulators may find themselves without a satisfactory option for portions of their application.


Created by:

Dan Fox
Dan FoxDan Fox is a Principal Specialist Solutions Architect at AWS. Dan works with customers to help them leverage serverless services to build scalable, fault-tolerant, high-performing, cost-effective applications.