Docs / awsemu CLI

awsemu CLI

A built-in AWS CLI wrapper that automatically configures credentials, region, and endpoint. Zero setup required.

What is awsemu?

awsemu is a thin wrapper around the standard AWS CLI. When you run any awsemu command, it automatically sets:

Every AWS CLI command works with awsemu. Just replace aws with awsemu.

awsemu wraps whichever aws binary is first on your PATH. The examples on this page assume AWS CLI v1, which is the version currently shipped with LocalEmu's [runtime] extra. AWS CLI v2-only flags such as --cli-binary-format are not recognised in v1; use the v1 equivalents shown below.

How it works

Comparison
# Without awsemu (verbose, error-prone)
$ aws --endpoint-url=http://localhost:4566 \
    --region us-east-1 \
    s3 ls

# With awsemu (same result, zero config)
$ awsemu s3 ls

Both commands produce identical results. awsemu simply injects the endpoint and credentials for you.

S3 Examples

S3
$ awsemu s3 mb s3://my-bucket
make_bucket: my-bucket

$ awsemu s3 cp myfile.txt s3://my-bucket/
upload: ./myfile.txt to s3://my-bucket/myfile.txt

$ awsemu s3 ls s3://my-bucket/
2026-04-06 10:00:00  1024 myfile.txt

$ awsemu s3api put-bucket-versioning \
    --bucket my-bucket \
    --versioning-configuration Status=Enabled

DynamoDB Examples

DynamoDB
$ awsemu dynamodb create-table \
    --table-name Orders \
    --key-schema AttributeName=orderId,KeyType=HASH \
    --attribute-definitions AttributeName=orderId,AttributeType=S \
    --billing-mode PAY_PER_REQUEST

$ awsemu dynamodb put-item --table-name Orders \
    --item '{"orderId":{"S":"o-100"},"total":{"N":"49.99"}}'

$ awsemu dynamodb scan --table-name Orders
{"Items": [{"orderId": {"S": "o-100"}, "total": {"N": "49.99"}}]}

Lambda Examples

Lambda
$ awsemu lambda create-function \
    --function-name my-func \
    --runtime python3.12 \
    --handler handler.handler \
    --role arn:aws:iam::000000000000:role/role \
    --zip-file fileb://function.zip

$ awsemu lambda invoke \
    --function-name my-func \
    --payload '{"key":"value"}' \
    out.json

$ awsemu lambda list-functions

SQS Examples

SQS
$ awsemu sqs create-queue --queue-name jobs
QueueUrl: http://sqs.us-east-1.localhost:4566/000000000000/jobs

$ awsemu sqs send-message \
    --queue-url http://sqs.us-east-1.localhost:4566/000000000000/jobs \
    --message-body '{"task":"resize","file":"img.png"}'

$ awsemu sqs receive-message \
    --queue-url http://sqs.us-east-1.localhost:4566/000000000000/jobs
Body: {"task":"resize","file":"img.png"}

ECS Examples

ECS
$ awsemu ecs create-cluster --cluster-name dev
clusterName: dev

$ awsemu ecs list-clusters
arn:aws:ecs:us-east-1:000000000000:cluster/dev

RDS Examples

RDS
$ awsemu rds create-db-cluster \
    --db-cluster-identifier my-cluster \
    --engine aurora-postgresql \
    --master-username admin \
    --master-user-password secret123

$ awsemu rds describe-db-clusters

Environment Variables

You can customize the endpoint that awsemu targets:

Custom endpoint
# Default: http://localhost:4566
$ awsemu s3 ls

# Point to a different host or port
$ LOCALEMU_ENDPOINT=http://192.168.1.10:4566 awsemu s3 ls

# Or export it for the entire session
$ export LOCALEMU_ENDPOINT=http://localhost:5000
$ awsemu s3 ls

awsemu vs manual AWS CLI

Feature awsemu aws --endpoint-url
Endpoint config Automatic Manual on every command
Credentials Automatic Must set env vars or profile
Region Automatic Must set env var or flag
Syntax awsemu s3 ls aws --endpoint-url=... s3 ls
AWS CLI required Yes (uses it under the hood) Yes