Running an EC2 instance locally using LocalStack

In this video, you'll learn how you can run an Elastic Compute Cloud (EC2) instance locally using LocalStack's core cloud emulator. Elastic Compute Cloud (EC2) is a core service within Amazon Web Services (AWS) that provides scalable and flexible virtual computing resources. EC2 enables users to launch and manage virtual servers, commonly referred to as instances. LocalStack is a core cloud emulator that allows you run EC2 instances using a Docker backend. Under the hood, LocalStack spins another Docker container that mimics an EC2 instance functionality, including other add-on features such as EBS, IMDS, and Load Balancers. Corrections: LocalStack will no longer provide the Ubuntu 20.04 Docker AMI (used in this video) by default in the next major release, though it can still be manually added, and on nine minutes & nine seconds mark, we meant 'localhost' instead of 'localstack'. To access the web server, you can hit the localhost:8000 endpoint as shown in the video.

Related Talks

Getting started with the LocalStack Model Context Protocol (MCP) Server

What if your AI coding assistant could not only write infrastructure code, but also deploy it, test it, and fix issues automatically — all on your local machine? That's exactly what the LocalStack MCP Server makes possible. In this session, we'll introduce the LocalStack Model Context Protocol (MCP) Server, a new tool that lets AI agents manage your entire local cloud development lifecycle through a conversational interface. You'll learn what MCP is and why it's a game-changer for AI-assisted development, how the LocalStack MCP Server turns manual cloud tasks into automated workflows, how to set up and configure the server with your favorite AI editor (Cursor, VS Code, etc.), and real-world demos: deploying CDK apps, analyzing logs, running chaos tests, managing state with Cloud Pods, and more. Through hands-on examples, we'll walk through a complete workflow where an AI agent deploys a serverless application, verifies resources, troubleshoots issues, and tests resilience, all without leaving the conversation. If you've ever wished your AI assistant could do more than just generate code, this talk will show you what's possible when agents can actually manage your local cloud environment.

Learn More
Learn More
Getting started with the LocalStack Dagger module

Looking to bring AWS emulation directly into your CI/CD pipelines? This hands-on session with Harsh Mishra shows you how to integrate LocalStack with Dagger to level up your development workflows. In this session, you'll learn how to run full AWS emulation locally inside Dagger pipelines, spin up LocalStack as a service using Dagger’s composable syntax, use Cloud Pods for persistent state across pipeline runs, and create ephemeral environments for fast, clean, isolated testing. Keep your cloud workflows repeatable, testable, and fast. Whether you’re building serverless apps, managing infrastructure-as-code, or optimizing your DevOps pipelines, this talk will help you bring LocalStack into the heart of your CI/CD setup.

Learn More
Learn More
Getting started with LocalStack's Extension for Docker Desktop

LocalStack's Docker Extension allows developers to manage and run cloud applications locally within Docker Desktop efficiently. With a fully-integrated experience with features such as configuration profiles, container logs, and more, developers can now easily manage their LocalStack instance. In this video, Harsh from LocalStack discusses the LocalStack Docker Extension and how you can capitalize on an intuitive user experience to manage your LocalStack image, configuration profiles, and container logs directly within the Docker Desktop.

Learn More
Learn More

Launch yourself in the world of local cloud development

Try for free
Try for free
Talk to Sales
Talk to Sales