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

Step-up Authentication using Amazon Cognito on LocalStack

LocalStack Applications in Developer Hub provides sample templates to help LocalStack users adopt real-world scenarios to rapidly and conveniently create, configure, and deploy applications locally.

Getting started with Step-up-authentication demo

In this demo, we will setup a step-up authentication workflow for a higher level of security, deployed using Cloud Development Kit on LocalStack

Learn More
Learn More
Smooth transition from local development to production for your AWS-powered applications

Running your Spring Boot app on AWS for production is common, but testing there can be slow and costly. In this video, we’ll show you how to speed up development using LocalStack. By provisioning your infrastructure with Terraform, you can easily switch to local testing in just three steps: configure your dev environment variables, start LocalStack in Docker, and run your IaC files. Get faster feedback and reduce costs by testing locally with LocalStack!

Learn More
Learn More
Simulate Microservices, Cloud Services, and Everything Else with WireMock & LocalStack

In this live session, WireMock CTO Tom Akehurst will introduce hybrid API simulation (local + cloud) with WireMock Runner. Tom will explain why we built Runner, how developers are using it today, and how it fits into modern dev and test workflows - such as simulating APIs during testing, prototyping, and AI-native development.

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