AWS 101BlogServices
← Back to Blog

AWS CLI Bundled + Python Init Scripts

April 13, 2026 · v1.2.9 · Contributed by @AdigaAkhil

What changed

Starting with v1.2.9, the MiniStack Docker image ships with AWS CLI v1 built in. You no longer need to install it yourself or mount a binary from your host. The image went from 242MB to 269MB — a +27MB trade-off for convenience.

Init scripts also got an upgrade: .py files are now supported alongside .sh scripts. Drop a Python file in ready.d/ and it runs automatically after MiniStack starts.

Init scripts just work

The biggest quality-of-life improvement: init scripts automatically receive credentials and endpoint configuration. No manual setup needed.

ready.d/01-create-resources.sh
# No --endpoint-url, no credentials — just works aws s3 mb s3://my-bucket aws sqs create-queue --queue-name my-queue aws dynamodb create-table \ --table-name users \ --key-schema AttributeName=id,KeyType=HASH \ --attribute-definitions AttributeName=id,AttributeType=S \ --billing-mode PAY_PER_REQUEST
ready.d/02-seed-data.py
# Python init scripts work too import boto3, os s3 = boto3.client("s3", endpoint_url=os.environ["AWS_ENDPOINT_URL"]) s3.put_object( Bucket="my-bucket", Key="config.json", Body=b'{"env": "local", "debug": true}' ) ddb = boto3.client("dynamodb", endpoint_url=os.environ["AWS_ENDPOINT_URL"]) ddb.put_item( TableName="users", Item={"id": {"S": "admin"}, "role": {"S": "superuser"}} )

Environment variables

These are set automatically for init scripts — you don't need to configure them:

If you set your own values via docker run -e, those take priority. This also works with multi-tenancy — set AWS_ACCESS_KEY_ID to a 12-digit number and init scripts create resources under that account.

Docker Compose example

docker-compose.yml
services: ministack: image: ministackorg/ministack:latest ports: - "4566:4566" volumes: - ./init-scripts:/docker-entrypoint-initaws.d

Script paths

Both MiniStack-native and LocalStack-compatible paths are supported:

Scripts from both paths are merged, deduplicated by filename, and run in alphabetical order.

Image size

Before: 242MB — After: 269MB (+27MB)

The CLI is AWS CLI v1 installed via pip (Apache 2.0 license, maintained by Amazon). Help examples and Python cache are stripped in a multi-stage build to keep the delta small.

Thanks to @AdigaAkhil for contributing this feature (#272).