Skip to content

Instantly share code, notes, and snippets.

@saiury92
Created January 10, 2023 10:14
Show Gist options
  • Save saiury92/58a743c89fdec99ab2251c1b22bd1be4 to your computer and use it in GitHub Desktop.
Save saiury92/58a743c89fdec99ab2251c1b22bd1be4 to your computer and use it in GitHub Desktop.
version: '3.2'
services:
localstack:
image: localstack/localstack:latest
container_name: localstack_demo
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- SERVICES=s3
- DEBUG=1
- DATA_DIR=/tmp/localstack/data
volumes:
- './.localstack:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
@saiury92
Copy link
Author

S3_AWS_ACCESS_KEY_ID='dummy'
S3_AWS_SECRET_KEY='dummy'
S3_AWS_BUCKET_NAME='test-bucket'

aws --endpoint-url=http://localhost:4566 --profile localstack s3api create-bucket --bucket test-bucket --create-bucket-configuration LocationConstraint=ap-northeast-1

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment