Running AWS Amplify Gen 2 Apps Locally with LocalStack
Blog post from LocalStack
AWS Amplify Gen 2 enables developers to define application backends in TypeScript and deploy services such as Cognito, AppSync, DynamoDB, Lambda, and S3 through the ampx CLI, but its normal sandbox workflow requires access to a real AWS account and creates CloudFormation stacks for each developer. The tutorial shows how LocalStack can emulate the necessary AWS services locally, allowing a React todo application to use an Amplify Gen 2 backend without affecting cloud infrastructure or requiring AWS credentials for every contributor. It explains how to configure a LocalStack AWS profile, bootstrap CDK, set endpoint and CORS options, deploy the backend with ampx sandbox, and connect the frontend through generated amplify_outputs.json settings, with an additional Cognito endpoint override for local use. The sample uses a Cognito identity pool to grant guest access and signs AppSync GraphQL requests with temporary AWS credentials, while Amplify generates the Todo API, DynamoDB table, and related CloudFormation stacks. Users can inspect deployed resources, table data, API calls, and logs using the LocalStack CLI or web interface, then run the sandbox in watch mode to update the data schema, such as adding an isDone field, through Amplify’s hotswap deployment process. The workflow concludes by deleting the sandbox stack and stopping LocalStack, demonstrating a local development loop that closely mirrors Amplify deployments on AWS.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Serverless | 5 | No monthly metrics for this publish month. | |||
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.