← Offstack All Offstack Docs Topic & How-To Guides v15.0.0 · ~15 KB

Upgrading from Earlier Versions

Migrate smoothly to v15.0.0 unified port routing, selective service boots, CI profiles, and all 96 supported AWS services.

Current v15.0.0 Note: Offstack now serves 96 AWS services (--unified-port 4566 + optional --tls), 15 cloud gateways, 12 verified RDBMS backends, and 8 data/SQL wire bridges. Migrated v1 consumers can keep their existing per-service flags below, switch to a single --unified-port 4566 + AWS_ENDPOINT_URL, or use --profile ci-core / --services dynamodb,s3,lambda,sts for selective fast boot (docs/USER_MANUAL.md).

For an application that runs against toolkits/local-simulator-aws and wants to run against toolkits/offstack instead. The application's own code does not change: both speak the AWS wire protocols, so the switch is a change of which process is serving the endpoint, plus the decisions below.

Measured on 2026-11-09 by running both simulators side by side on separate ports and issuing the same 32 boto3 calls to each. Results are in §5.


0. Behaviour changes a consumer can feel

Two things an existing consumer may notice, both deliberate:

A failing consumer no longer loses its event. Before 2026-11-11 every event-delivery bridge treated a handler that raised as a success: an SQS message was deleted, and Kinesis and DynamoDB Streams checkpoints advanced past records that were never processed. A consumer that relied on failed messages disappearing will now see retries instead -- which is what AWS does. This is the one change in this document that can alter an application's observable behaviour rather than its endpoint.

API Gateway routes may target a service instead of a function. A route with an integration block writes straight to SQS (lambda_api/integrations.py). Unmodelled targets raise and answer 500 rather than silently answering 200.


1. The good news: nothing in the application changes

Offstack accepts the launch command the current consumer already uses, argument for argument:

python <sim-root>/start.py --persist \
    --state-file    <data-dir>/simulator_state.db \
    --dynamodb-port 13160 --s3-port 13161 \
    --s3-data-dir   <data-dir>/simulator_s3_data

--persist, --state-file, --dynamodb-port, --s3-port, --s3-data-dir, --lambda-port, --lambda-config, --env-file, --sts-port, --warm-lambdas, --docker, --thread-pool-size, --mpu-ttl-hours and --simulate-gsi-lag are all still accepted with the same meaning. Verified by launching Offstack with exactly the argv a consumer derives today.

The defaults of the new services are additive, not changes: --sqs-port 4596, --secretsmanager-port 4594, --ssm-port 4593, --logs-port 4597, --cloudwatch-port 4598, --cognito-port 4599, --events-port 4600, --sns-port 4601, --iam-port 4602, --dynamodbstreams-port 4603, --cloudformation-port 4604, --kinesis-port 4605, --stepfunctions-port 4606. A consumer that passes none of them gets these; one that must not bind extra ports passes 0 for each (§4).

If the consumer imports the simulator's Python API directly rather than going over HTTP — as ArtificialIntelligenceHarness/gateway/dynamodb_inprocess.py does with from dynamodb.storage_engine import StorageEngine — that also still works. Offstack's StorageEngine is a strict superset of v1's: all 19 public methods present with identical signatures, plus describe_time_to_live and update_time_to_live.


2. What must change

2.1 Point the launch path at Offstack

The consumer resolves the simulator root in this order (gateway/simulator_helper.py), so either replace the path or set the env var:

$LOCAL_SIMULATOR_ROOT/start.py                     <- honoured first
<sibling>/toolkits/local-simulator-aws/start.py    <- fallback that would still find v1

Set LOCAL_SIMULATOR_ROOT=<...>/toolkits/offstack. Do not rely on the fallback — it names v1 by path, so leaving it alone keeps launching v1 while looking like a migration happened.

For the in-process backend, the equivalent variable is LOCAL_SIMULATOR_AWS_ROOT (read by gateway/dynamodb_inprocess.py); point it at the Offstack root.

2.2 Uninstall v1 before installing Offstack — they collide

Both distributions declare the same top-level Python packages (dynamodb, s3, sts, ssm, lambda_api). Verified in a clean virtualenv:

Stepimport dynamodb resolves to
pip install -e local-simulator-aws.../local-simulator-aws/dynamodb
+ pip install -e offstack.../local-simulator-aws/dynamodb (v1 still wins)
pip uninstall local-simulator-aws.../offstack/dynamodb

Installing Offstack does not replace v1 — the two coexist and whichever .pth/path entry sorts first wins, silently. v1's editable install pins five top-level package names; Offstack pins sixteen. Uninstall v1 in the environment that runs the simulator, then install Offstack.

2.3 Dependencies (was a packaging bug — fixed 2026-11-10)

Until 2026-11-10 pip install offstack from a clean venv left the simulator unable to start:

ModuleNotFoundError: No module named 'sqlalchemy'

pyproject.toml declared no dependencies — sqlalchemy appeared only inside the [postgresql] / [mysql] / … extras, so the "SQLite default, zero-config" path advertised in the README installed nothing.

Fixed: [project] dependencies now lists sqlalchemy, cryptography, PyJWT and botocore, and tests/test_packaging_metadata.py AST-walks every shipped package and fails if a third-party import is undeclared, so this cannot silently return. On an older checkout, install it alongside:

pip install -e <offstack-root> sqlalchemy

2.4 Regenerate your config files

lambda_routes.json, env.json and table_schemas/*.json are per-consumer and were not carried over — Offstack ships its own demo contents (a demo env entry, an examples/lambda route, offstack-demo-* table names). If the consumer passes --lambda-config / --env-file / its own schemas explicitly they are untouched; if it relies on the checked-in defaults, port them in.

table_schemas/certus.json and heston.json differ in substance, not just formatting: Offstack's versions carry the real key schema (projectId/featureNumber, GSIs) where v1's used a generic pk/sk pair. Use Offstack's.

2.5 Default ports moved

The values the app reads from the fleet registry (sim_dynamodb 13160, sim_s3 13161) are unchanged, and the consumer passes them explicitly — so a registry-driven consumer sees no difference. Only bare python start.py moved:

v1Offstack
DynamoDB1800013160
S31500013161
Lambda / API GW1300013000
STS1459214592

2.6 Running v1 and Offstack side by side

Useful for the parallel check in §5, and for anyone who wants to compare before committing. Two things must differ, and both have flags:

# v1 — defaults, its own data dir
cd <v1-root> && python start.py

# Offstack — every port offset, its own state file and S3 dir
cd <offstack-root> && python start.py \
    --persist --state-file ./offstack_state.db \
    --dynamodb-port 14160 --s3-port 14161 --lambda-port 14000 \
    --sts-port 14593 --ssm-port 14594 \
    --s3-data-dir ./offstack_s3_data

Three things to know:

Offstack runs in memory and the two are separate by construction, but any script that assumes a file path will look for v1's.

not shared with v1 and the layout inside it differs (§3).

second simulator could bind a port another process owned and both would answer; Offstack now exits 1 with no banner instead (STARTUP_CONTRACT.md §4). So a forgotten v1 on 13160 makes Offstack's default run fail loudly — which is the intended behaviour, but it means the side-by-side command above must actually pass the offsets.

--*-port 0 is the alternative when no fixed numbers are needed: the OS picks, and the banner reports the port each service really bound. A launcher that needs the numbers must read them from that output.


3. Where the files are written

Given the launch command in §1, Offstack writes exactly where v1 did:

WhatPath (with the argv above)
DynamoDB + SQS + Logs + Cognito + Secrets + Lambda-API state<data-dir>/simulator_state.db (+ -shm, -wal while running)
S3 objects<data-dir>/simulator_s3_data/<bucket>/
Simulator stdout/stderrwherever the supervisor redirects it — the consumer already sends it to <data-dir>/logs/aws_simulator.log

Defaults when not overridden:

Settingv1 defaultOffstack default
state file./simulator_state.db./offstack_state.db
S3 data dir./s3_data./s3_data
Lambda config./lambda_routes.json./lambda_routes.json

Note the state-file default changed name. An app that passes --state-file explicitly is unaffected; one that relies on the default starts empty.

S3 object layout inside the bucket directory changed

Same directory root, different filenames. v1 wrote the raw key with a .meta sidecar; Offstack percent-encodes the key, adds an .obj suffix and uses .meta.json, plus a per-bucket .offstack-bucket.json:

v1:        <bucket>/a/hello.txt          <bucket>/a/hello.txt.meta
Offstack:  <bucket>/a/hello%2Etxt.obj    <bucket>/a/hello%2Etxt.meta.json

This is deliberate on Offstack's side — the raw-key mapping in v1 lets a key ../.. escape the bucket directory and lets a key ending in .meta clobber another object's metadata. The consequence for a switch: an existing simulator_s3_data tree is not readable by Offstack. Point the new simulator at an empty directory, or have the app re-upload. Objects read back through the API are unaffected; only the on-disk bytes differ.

Nothing else appears

Offstack does not write into the simulator's source tree beyond ./s3_data, ./profile_log.json and the state file, same as v1. Its --persist flag has the same meaning (state survives restart; without it everything is :memory:).


4. New things Offstack needs that v1 did not

SSM 4593, Secrets Manager 4594, Lambda API 4595, SQS 4596, CW Logs 4597, CW Metrics 4598, Cognito 4599, EventBridge 4600, SNS 4601, IAM 4602, DDB Streams 4603, CloudFormation 4604, Kinesis 4605, Step Functions 4606, RDS 4607, RDS Data 4608, Schemas 4609, API Gateway REST 4610, API Gateway HTTP 4611, Scheduler 4612, Pipes 4613, SES 4614, SESv2 4615, KMS 4616, ACM 4617, Cognito Identity 4618, X-Ray 4619, Timestream write 4620, Timestream query 4621, S3 Tables 4622, Route53 4623, CodeCommit 4624, ElastiCache 4625, MemoryDB 4626, plus the 4627–4689 AWS services added through v15.0.0. A v1 consumer that wants only its minimal subset can pass --services dynamodb,s3,lambda,sts or --profile ci-core, use --unified-port 4566, or bind unused ports to 0.

started it — the banner listed four services. Offstack starts SSM at 4593 like every other service. An app whose only SSM exposure was a port that was never open will now find a real Parameter Store answering (and, per v1's P1 finding, answering correctly — ParameterNotFound instead of a 200 with the parameter name as the value).

something other than an HTTP route: DynamoDB Streams, Kinesis, SQS event-source mappings, and S3 ObjectCreated notifications (dynamodbstreams/bridge.py, kinesis/bridge.py, sqs/bridge.py, s3/bridge.py). This matters for the switch because a template that declared such a mapping under v1 deployed a function that never ran — nothing wrote a record to a stream, so nothing looked broken. Under Offstack those pipelines start executing. If a consumer's integration suite asserted "the row never appears" as a proxy for something else, it will now see the row.

counterpart. Step Functions interprets ASL itself (Pass, Task, Choice, Wait, Succeed, Fail, Map, Parallel, the four *Path fields, .$ intrinsic keys, Retry), and a Task may invoke a Lambda in this process. State machines and executions are stored like every other service, so they persist across restarts when --persist is set.

and /_ui unconditionally; Offstack gates them, which is what you want in a shipped product but will surprise someone who used those endpoints deliberately.


5. What the parallel run showed

Both simulators were launched on separate port sets and the same 32 boto3 probes issued to each. 22/32 responses were byte-identical. The ten that differed split into three groups:

v1 was wrong, Offstack matches AWS (7). These are behaviour changes an app may notice — all of them in the direction of real AWS:

Probev1Offstack (= AWS)
PutItem missing a key attribute200 {} — silently acceptedValidationException 400
Query with no KeyConditionExpression200 empty resultValidationException 400
numeric sort key ordering10 before 2 (lexicographic)2 before 10 (numeric)
PutObject into a missing bucketauto-creates the bucketNoSuchBucket 404
CreateBucket on an existing bucket200BucketAlreadyOwnedByYou 409
DescribeTable ItemCount4 after 3 writes3 (correct)
CreateBucket response{}Location header value

An app that relied on any of the v1 behaviours must pre-provision its buckets and stop sending malformed requests — that is the same work it needs to do before running against real AWS.

Offstack supplies metadata v1 omitted (2). TableDescription gains TableArn, BillingModeSummary; CopyObject carries a LastModified. AWS returns these too. Additive — nothing breaks.

Timestamps (1). LastModified differed by one second between the two processes. Not a defect.

Every error code that both produced (NoSuchBucket, ResourceNotFoundException for a missing table, ConditionalCheckFailedException) was identical, including the HTTP status and the message text.


6. Checklist

  1. pip uninstall local-simulator-aws in the runtime environment.
  2. pip install -e <offstack-root> sqlalchemy.
  3. Set LOCAL_SIMULATOR_ROOT (and LOCAL_SIMULATOR_AWS_ROOT if the in-process

backend is enabled) to the Offstack root.

  1. Port lambda_routes.json / env.json / table_schemas/*.json if the app

relied on the checked-in defaults.

  1. Point --s3-data-dir at an empty directory (the layout changed).
  2. Pre-provision S3 buckets the app writes to — auto-create is gone.
  3. Start it and re-run the app's own test suite.
  4. If the app declares SQS, Kinesis, DynamoDB-Streams or S3 notification

wiring, expect those functions to actually run now (§4). A test that passed under v1 by observing nothing will need re-reading, not re-baselining: the pipeline firing is the correct behaviour.


Want a live walkthrough or evaluation setup for Offstack? Message George Vranjesevic or reach out at george@developmentsnapshot.com.