Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Created December 22, 2023 20:32
Show Gist options
  • Save mortymacs/131c6f1a24ccab59480ea78871606dc3 to your computer and use it in GitHub Desktop.
Save mortymacs/131c6f1a24ccab59480ea78871606dc3 to your computer and use it in GitHub Desktop.
localstack and aws-cli local config

Run localstack docker:

docker run -d --rm \
                -p 4566:4566 -p 4510-4559:4510-4559 \
                --name localstack \
                localstack/localstack

Add aws cli config:

~/.aws/config

[profile localstack]
region = us-east-1

~/.aws/credentials

[localstack]
aws_access_key_id = foo
aws_secret_access_key = bar

Set alias locally:

aws-local="aws --endpoint-url http://127.0.0.1:4566 --region us-east-1 --profile localstack"

Test:

aws-local s3 ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment