Skip to main content

LocalStack

This page provides an introduction to LocalStack.

Overview

LocalStack is complete, localized AWS environment where developers can build, test, profile and debug infrastructure and code ahead of deployment to the cloud.

Install LocalStack

docker pull localstack/localstack

pip install awscli-local

brew install localstack/tap/localstack-cli

Start LocalStack

You can start localstack using localstack command

localstack start -d

Or you can use docker command

docker run --rm -it -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack

Check LocalStack Status

localstack status

Create S3 Bucket in LocalStack

aws --endpoint-url=http://localhost:4566 s3 mb s3://my-bucket

make_bucket: my-bucket

List S3 Bucket in LocalStack

aws --endpoint-url=http://localhost:4566 s3 ls

2024-10-01 20:45:08 my-bucket

Run Pulumi in LocalStack

Install pulumilocal using below command

pip install pulumi-local

Configure Pulumi in LocalStack

pulumi login file://.

pulumi new aws-python --force

Stop LocalStack

localstack stop

container stopped: localstack-main