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.For more information, check out our docs:- Install LocalStack: https://docs.localstack.cloud/getting-started/installation/- Configure an Auth Token: https://docs.localstack.cloud/getting-started/auth-token/ - Supported EC2 operations: https://docs.localstack.cloud/user-guide/aws/ec2/#operations - Supported Instances & AMIs: https://docs.localstack.cloud/user-guide/aws/ec2/#instances-and-amis Corrections:- LocalStack will no longer provide the Ubuntu 20.04 Docker AMI (used in this video) by default in the next major release. It can still be manually added.- 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

Fake It Till You Make It: Cloud Edition

Building and debugging cloud-native applications often involves slow CI/CD pipelines, hard-to-reproduce bugs, and the need for costly shared environments. LocalStack offers a better way — letting developers simulate real AWS services entirely on their local machine.In this presentation, Kiah Imani gives a hands-on walkthrough of building and testing AWS workflows locally with LocalStack. From Lambda functions to S3 pre-signed uploads and SNS/SQS pipelines, you'll see how to prototype, debug, and iterate on cloud-native apps without ever deploying to the cloud.### Resources- S3: https://docs.localstack.cloud/aws/services/s3/- Lambda: https://docs.localstack.cloud/aws/services/lambda/- SQS: https://docs.localstack.cloud/aws/services/sqs/- SNS: https://docs.localstack.cloud/aws/services/sns/- Repo: https://github.com/localstack-samples/sample-serverless-image-resizer-s3-lambda/

Learn More
Learn More
Develop and test your AI-powered cloud apps locally with LocalStack

Running AI/ML workloads in the cloud can be expensive, opaque, and difficult to iterate on. LocalStack changes this by enabling engineers to develop and test AI-powered cloud applications entirely locally, emulating services like SageMaker, Bedrock, Redshift, and Snowflake.In this presentation, Waldemar Hummer, CTO of LocalStack, demonstrates how to prototype and validate AI & ML data pipelines safely and cost-effectively using LocalStack’s cloud emulators. You’ll see how to emulate complex AI workflows, test integrations, and use “vibe coding” techniques confidently in a fully sandboxed local environment.

Learn More
Learn More
Deploy and Test Data Migration Pipeline with DMS

AWS Database Migration Service provides migration solutions from databases, data warehouses, and other types of data stores (e.g. S3, SAP). The migration can be homogeneous (source and target have the same type), but often is heterogeneous as it supports migration from various sources to various targets (self-hosted and AWS services).LocalStack supports DMS with selected use cases. In this session from LocalStack Community Meetup July '24, Mathieu Cloutier explores how to use LocalStack to migrate from a MariaDB database to an AWS Kinesis Stream. He goes over the differences between CDC and full load, and as a bonus you will see how easy it is to migrate from an external database to your Kinesis Stream — tested all on your local machine!Docs: https://docs.localstack.cloud/user-guide/aws/dms/

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