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

Reference Sample Applications

Run 43 audited official AWS samples across .NET 8, Python, and TypeScript alongside packaged .NET Lambda host and live Durable Execution support.

Date: 2026-11-16, revised 2026-11-17 (v15.0.0 note: packaged Enterprise builds now also bundle lambda_service/dotnet_host/publish/Offstack.DotnetHost.* so .NET 8 Lambda handlers execute from compiled installs, and Durable Execution write-side checkpoints/callbacks are live per docs/DURABLE_EXECUTION_SCOPE.md) · Source: aws-samples/serverless-test-samples (MIT-0), shallow clone pinned in .shallow-tmp/ (git-ignored).

The denominator is 43, not 38. Every sample directory under the four language folders, excluding img/ and workshops/:

python-test-samples     14      typescript-test-samples  11
java-test-samples        8      dotnet-test-samples       9
                                                total    43

An earlier working figure of "38" was carried in conversation and never committed; it is wrong. Recount from the tree, not from memory.

Method: a sample is gated if it runs green against Offstack under tests/test_reference_app_gate.py — normally its own unmodified suite, but for a sample whose suite is mock-only (it never constructs a client pointed at the simulator) the gate deploys the sample's real handler and asserts the result instead. Which form a gate takes is stated at each one. Everything else is blocked, and each blocker below was read out of the sample's own files — README, template.yaml, or a .csproj — never inferred.

Summary

Counts are computed over the 43 directories, not tallied by hand:

statecount
gated (own suite green, or a deployment gate where the suite is mock-only)21
blocked: the sample sets up its own runtime (container/ECS)9
blocked: third-party SaaS, AppSync, or no local impl9
blocked: AWS SDK pinned too old4
——
total43

"Not yet attempted" is now empty and its section is gone. As of 2026-11-17 every one of the 43 is either gated or blocked on something measured. The last two rows it held — python/lambda-mock and typescript/lambda-handler-dynamodb — were both gated, and both for a reason the old rows had wrong: see their entries below.

Every one of the 43 is a row in exactly one bucket table, and the counts above sum to 43. A script check (2026-11-17) confirms no directory is unmentioned and none is a row twice. A sample may still be described under another heading — typescript/async-lambda-dynamodb and java/schema-and-contract-testing are mentioned under the history note below — but neither is a row outside its bucket.

History, so the next reader does not re-open this: before 2026-11-17 this table read 18 gated / 7 not-yet-attempted, and one heading said "Gated (16)" while the table under it listed 18 rows. The 16 was a typo, and 18 was the right count until typescript/async-lambda-dynamodb was gated (→ 19), five "not yet attempted" rows were re-measured into real blockers (→ 2), and the last two of those were gated (→ 21, and the section emptied). Recount from the tree, never from the previous total.

26 gate functions cover 22 sample directories — the 21 green ones plus dotnet/apigw-lambda-ddb, whose gate is permanently skipped. Three samples carry more than one gate function, because a sample's own suite does not always reach the part of the product the sample is about: apigw-lambda-layer (2), kinesis-lambda-dynamodb (2) and lambda-mock (3 — one is the skipped mock-only suite, two are deployment assertions). The other 19 have one gate function each. Counted by an AST walk of the gate file on 2026-11-17 (resolving fixtures and module-level app variables to their APPS / "<dir>"), not by eye — a regex over the text miscounts both ways, because a fixture name is not a directory name.

apigw-lambda-layer and lambda-mock are the two clearest cases of a second gate: each has a mock-only suite, so the delivery assertion beside it is the real gate. For apigw-lambda-layer, whose suite mocker.patches the handler's bucket-list call and runs a layer module under @mock_s3, the extra gate deploys the real handler with both real layers and asserts a 200 through API Gateway. lambda-mock is the same shape for a different reason: every test in it is @moto.mock_*, so its deployment gate seeds two DynamoDB rows and asserts the handler really writes the S3 object.

"Reachable in principle" is not a claim they are cheap — each needs a bootstrap written and, in several cases, a service widened first.

Gated (21)

samplewhat it proves
python/apigw-lambdaAPI GW v1 → Lambda → 200
python/apigw-lambda-dynamodbAPI GW v1 → Lambda → DynamoDB 200/404
python/apigw-sqs-lambda-sqsAPI GW → SQS → Lambda → SQS → DynamoDB
python/async-lambda-dynamodbS3 notification → Lambda → S3 + DynamoDB
python/kinesis-lambda-dynamodbKinesis → Lambda → DynamoDB, mapping delivers
python/cns427-testable-serverless-architectureDynamoDB via the app's own adapters
typescript/typescript-test-introAPI GW v1 → Node Lambda → S3 list
typescript/apigw-lambda-dynamodbAPI GW v1 → Node Lambda → DynamoDB
dotnet/apigw-lambda-list-s3-bucketsv1 proxy request/response + .NET S3 SDK
dotnet/async-lambda-sqsS3-event handler on real SQS (.NET)
dotnet/sqs-lambdaSQS → .NET function → DynamoDB
dotnet/kinesis-lambda-dynamodbKinesis → .NET function → DynamoDB
dotnet/async-lambda-dynamodbtwo chained S3 notifications → two .NET functions
dotnet/schema-and-contract-testingExportSchema + in-process contract validation
dotnet/hexagonal-architecture.NET DocumentModel API against DynamoDB
typescript/kinesis-lambda-dynamodbKinesis → Node Lambda → DynamoDB + a DynamoDB-stream listener; Kinesis over HTTP/2
typescript/async-lambda-dynamodbtwo chained S3 notifications → two Node Lambdas → DynamoDB; the second language on the async pattern (2026-11-17)
python/apigw-lambda-layerAPI GW → Lambda whose schemas/layer imports live in two attached layers
typescript/apigw-lambda-externalfunction calls a type: mock RestApi imported from an OpenAPI Body; VTL picks 200/404
python/lambda-mockAPI GW → Lambda → DynamoDB + S3, deployed from the sample's own template; its own suite is @moto-only so a deployment gate is the real test (2026-11-17)
typescript/lambda-handler-dynamodbthe sample's own in-process test: handler → DynamoDB Put → read back; no CDK needed, the test imports neither aws-cdk-lib nor constructs (2026-11-17)

Blocked: the sample sets up its own runtime (9)

These are not blocked by Docker being absent — Docker Desktop is installed on this host (com.docker.service, StartType Manual). The daemon was stopped when this was last checked (2026-11-17), but that is not the blocker either: even with it running, the container is the system under test: the suite starts amazon/aws-stepfunctions-local or amazon/dynamodb-local and calls that. Gating them would produce a green test that never touches Offstack, which is worse than no gate at all. Starting the daemon cannot change that; only rewriting the sample could.

But "cannot be gated" is not "cannot be used", and three of these are now usable as probes. About 99% of a sample's source is AWS's own assertions about an AWS-compatible endpoint — which is exactly what Offstack is — so a mechanical edit (swap the container's endpoint for the simulator's, drop the container fixture, point the ASL path at a file) turns the sample's assertions into evidence about Offstack. That edit is why the result is a specification probe, not a gate: a gate's value is that the published code runs unmodified, so a probe pass proves strictly less. They are test_probe_step_functions_helloworld, test_probe_step_functions_lambda and test_probe_dotnet_test_containers in tests/test_reference_app_gate.py, and they are not counted in the 21 gated or the gate file's 22 directories.

The work paid for itself twice. Running helloworld against Offstack found that GetExecutionHistory emitted only ExecutionStarted and ExecutionSucceeded, with no per-state events, so stateExitedEventDetails was always missing; the existing test_history_records_the_run could not see it because it asserted only the first and last event. Reading the TypeScript sample's assertions then found a second defect in the first fix: AWS emits both TaskSucceeded and TaskStateExited for a successful Task — the former carries resource (what the Python sample reads), the latter carries the state name (what the TypeScript sample filters on) — and the first implementation had replaced one with the other. Both are fixed 2026-11-17 in stepfunctions/storage.py and pinned by tests/test_stepfunctions_comparison.py.

dotnet/test-containers turned out to be the most convertible of all: TestStartup is the only file that touches the container and already builds its client with an explicit ServiceURL, so one line re-points it. Its 17 tests are invoked in-process and exercise real CreateTable/PutItem/ GetItem/DeleteItem round-trips.

The other two Step Functions samples in this family stay unprobeable for a reason that is not an Offstack gap: step-functions-local and step-functions-local-mock start the container with SFN_MOCK_CONFIG=MockConfigFile.json and execute name#TestCase ARNs. That is a stepfunctions-local-only way of scripting per-Task mock responses, error names and retry counts — there is no AWS API behind it to emulate. (The TypeScript step-functions-local uses the same #TestCase mechanism, so it is unprobeable for the same reason.) What those samples assert is still useful, and it is what exposed the TaskStateExited half of the defect above.

python/step-functions-local, python/step-functions-local-helloworld, python/step-functions-local-lambda, python/step-functions-local-mock (4) — each of the four has tests/unit/src/test_step_functions_local.py doing DockerContainer("amazon/aws-stepfunctions-local"). Named individually on 2026-11-17: they were previously written as "and its siblings", which left three of the 43 with no finding of their own, so a reader counting rows could not tell they had been looked at. · typescript/step-functions-local (1) — testcontainers is a declared dependency and the test imports GenericContainer. · dotnet/test-containers (1) — Testcontainers + Testcontainers.DynamoDb 3.5.0 in the integration-test csproj. · java/fargate-dynamodb-sync and java/fargate-lambda-stepfunction-async (2) — a different blocker in the same bucket: Spring Boot services deployed to ECS/Fargate behind an ALB. They are not blocked by Docker being absent, and "there is no Lambda path" is too strong for the second one (it ships a Dockerfile and its pom builds a runnable jar): the deciding fact is that neither sample's own tests talk to a local AWS endpoint — fargate-dynamodb-sync's e2e suite does requests.post("http://<host>/customers/") against a live deployment, and fargate-lambda-stepfunction-async's tests are @SpringBootTest with @MockBean AmazonDynamoDB, so a green run would grade Mockito. Gating either means running the JVM service, which is an ECS/ALB runtime question, not an Offstack one. · java/step-functions-local (1) — a stub, not a sample: the directory is README.md + metadata.json only, and the README points at an external repository. There is nothing here to build, container or not. It is counted as blocked because it cannot be gated; it is the one entry in this section that is not a Docker or ECS question at all.

Blocked: third-party SaaS, AppSync, or no local implementation (9)

typescript/apigw-lambda-sqs-sns-datadog (Datadog) · typescript/launchdarkly-lambda-dynamodb (LaunchDarkly SDK key) · typescript/appsync-cognito-lambda-aleios (AppSync + cdk.json) · java/java-appsync-sam (AppSync, KMS) · python/durable-functions-integration (AWS Durable Execution. This row said the runner "offers no endpoint override" — wrong, corrected 2026-11-17 by reading the SDK: DurableFunctionCloudTestRunner.__init__ takes lambda_endpoint: str | None = None and passes it to boto3.client("lambda", endpoint_url=...), so the sample can be pointed at a local endpoint. The real blocker was the durable-execution Lambda surface: the runner invokes, then reads response["DurableExecutionArn"] from the Invoke response and polls GetDurableExecution/GetDurableExecutionHistory, and Offstack's Invoke returned no such field, so the runner raised "No DurableExecutionArn in response". Built 2026-11-19: durable-configured functions mint the execution, the ARN travels in the Invoke payload, and history/state/ checkpoint/callbacks are live (docs/DURABLE_EXECUTION_SCOPE.md, green in tests/test_lambda_durable_invoke.py). What remains is the handler side: the sample's handler imports aws-durable-execution-sdk-python, whose @durable_execution wrapper is the replay engine, so gating it means running the real SDK against the simulator -- a runner harness, not a simulator gap. The handler also needs aws-durable-execution-sdk-python, which is a different execution model from an ordinary Lambda handler) · python/integrated-application-test-kit — not "a test harness, not a deployable sample" as this row used to say; its plugin_tester/template.yaml is a real SAM app (AWS::Serverless::StateMachine, AWS::Events::Rule, AWS::EventSchemas::Registry). Its blocker is not Step Functions, as this row said until 2026-11-17: Offstack does execute StateMachine definitions (that is how the three probes above run). The blocker is aws-iatk, and it is a toolchain one. The package publishes an sdist only — no wheel on PyPI at any version — and its setup.py shells out to go build to compile a ~51-file Go listener binary into iatk_service/iatk, so installing it needs a Go toolchain (there is none on this host). Even built, add_listener/poll_events clone an EventBridge rule and poll a queue that the tests' own listener service manages. Offstack's EventBridge does deliver rule→Lambda, so that part would work. The sample's state machine would also not run as written: its Task is arn:aws:states:::events:putEvents.waitForTaskToken, and .waitForTaskToken is not implemented — the interpreter runs the putEvents call and moves on rather than suspending for the callback, so the workflow's "did the plugin answer the task token" question is never actually asked. (putEvents itself is performed as of 2026-11-17; see the note below.) · python/schema-and-contract-testing, typescript/schema-and-contract-testing and java/schema-and-contract-testing — verified, not assumed: none of the three constructs an AWS client at all. Their suites diff JSON Schema versions and exercise pydantic models or a local business rule, so a gate would grade those libraries, not Offstack. The Python and TypeScript ones are vendored under tests/reference_apps/, so the claim can be re-checked by reading them; the Java one is not vendored — its finding is a quote from the upstream tree (below).

The Java one was added to this list on 2026-11-17, by reading it rather than assuming the Python finding generalised. Its three test files import only Jackson, com.networknt.schema and JUnit 5 (plus java.*), and a grep for software.amazon.awssdk across its whole src/ returns nothing. The one awssdk reference in the sample is a <dependencyManagement> BOM entry in pom.xml at 2.18.16 — a version pin with no dependency actually consuming it, so the sample constructs no client and the pin cannot block it either.

It would have been "blocked on the pin" by the version alone, which is the trap this row avoids: calling it blocked on the pin implies a newer SDK could gate it, and nothing in the sample would change if the SDK were newer.

Blocked: AWS SDK pinned too old (4)

All four pin (or quietly resolve) an SDK that predates the AWS_ENDPOINT_URL override, so the sample's own client reaches real AWS no matter where the environment points it. Each was measured by pointing the variable at a closed port and observing the call still go out.

sampleSDK pinhow it fails
dotnet/apigw-lambda-ddb3.7.100.14with AWS_ENDPOINT_URL_CLOUDFORMATION set, its own DescribeStacks reached real AWS and failed "The security token included in the request is invalid." Gate exists, marked skip.
java/apigw-lambda-list-s3-buckets2.18.14ignores AWS_ENDPOINT_URL; measured earlier
java/async-lambda-dynamodb2.20.92ignores it; measured 2026-11-17
java/apigw-lambda-ddb2.18.14 (SDK BOM in TicketsFunction/pom.xml)ignores it; the earlier "unpinned, must be resolved by Maven" was wrong — the BOM pins it explicitly

java/java-appsync-sam is not in this bucket even though its SDK (2.18.16) would also ignore the variable. It is counted in the AppSync bucket, where AppSync being unserved blocks it whatever the SDK pin does — so its pin is a second reason, not the one that decides it. Listing it here too made this table and the AppSync bucket both claim it, so the bucket counts summed to 44 over a 43-sample denominator.

None of the measured Java SDK versions (2.18.14, 2.17.x and 2.20.92) honours AWS_ENDPOINT_URL.

The same hazard exists in one TypeScript sample, and it is subtler. typescript/lambda-handler-dynamodb declares ^3.360.0 — a caret range — so the answer depends on the install command: npm ci takes the lockfile's floor, 3.360.0, which predates the variable, while npm install resolves a current 3.x that honours it. That sample is gated, not blocked, because the range admits a working version and the sample's own README uses npm install; its gate refuses to run an SDK that cannot honour the variable. See the "not yet attempted" section below.

The whole Java corpus, and which blocker actually decides each sample

All eight Java samples are blocked, but on three different things — the pin is the deciding blocker for only three of them. This table is a cross-cut for the Java reader; it is not a bucket and the sections above already place every one of these samples.

java samplethe blocker that decides it
java/apigw-lambda-ddb, java/apigw-lambda-list-s3-buckets, java/async-lambda-dynamodbthe SDK pin — a newer SDK would unblock these
java/java-appsync-samAppSync, which Offstack does not serve; a newer SDK would not unblock it
java/schema-and-contract-testing, java/step-functions-localnothing to gate — neither constructs a client (step-functions-local is a stub with no source)
java/fargate-dynamodb-synca Spring Boot HTTP service — its e2e suite requests.posts http://localhost/customers/, so it needs a running JVM behind an ALB, not a local AWS endpoint
java/fargate-lambda-stepfunction-async@SpringBootTest with @MockBean AmazonDynamoDB; every DynamoDB call is mocked, so a green run would grade Mockito. Its standalone code is a Fargate task (Dockerfile), not a Lambda handler

Pinning a newer SDK would stop a sample being the unmodified sample, which is the whole point of a gate. That is what makes the first row a real blocker and the second row's pin merely an extra reason.

The measurement behind that table, re-taken 2026-11-17: AWS SDK for Java v2.18.14, v2.17.x and v2.20.92 do not honour AWS_ENDPOINT_URL. Each was proved the same way — point the variable at a closed port and see where the call goes. v2.20.92 answered

400 "The security token included in the request is invalid." Request ID: IMG6OBAOPOLRVPEQSUUGNKAHGNVV4KQNSO5AEMVJF66Q9ASUAAJG

which is real AWS — a closed local port cannot produce an AWS request ID, and the 400 is AWS rejecting the dummy credentials the probe sent. v2.59.1 does honour the variable, but no sample in this corpus pins a version that honours it, so the caveat is not a stepping stone to a gate; it is the gate's blocker.

The "not yet attempted" bucket is now empty (was 2 on 2026-11-17)

Both remaining rows were gated on 2026-11-17, and both blockers this document stated for them were wrong — wrong in the direction that made cheap work look expensive, which is the same trap the API Gateway row sprang before. Recorded here so the reasoning does not get re-litigated from the wrong premise:

samplethe stated blockerwhat reading the files showed
python/lambda-mock"deploys via AWS::ServerlessRepo::Application (SAR)"Nothing deploys. The template's SAR key is Metadata, read at publish time, not deploy. The sample has no integration suite and no describe_stacks step, so there was never a bootstrap to play. Its own suite is @moto.mock_*-only, so — like apigw-lambda-layer — the gate is a deployment assertion: seed two DynamoDB rows, POST the route, assert the S3 object exists with the right contents and that a missing doc type is a 404 not a 500.
typescript/lambda-handler-dynamodb"CDK (cdk.json), needs synth or a template"No synth needed. `grep -rn "aws-cdk-lib\

typescript/lambda-handler-dynamodb carries a hazard worth its own warning. Its package.json declares ^3.360.0 — a caret range, not a pin — and its committed lockfile pins the range's floor, 3.360.0, which predates AWS_ENDPOINT_URL. npm ci therefore installs a client that cannot be redirected to the simulator and reaches real AWS: measured by pointing AWS_ENDPOINT_URL_DYNAMODB at a closed port, which still produced 400 "The security token included in the request is invalid." with a real AWS request id. npm install inside the declared range resolves a current 3.x that honours the variable. The gate checks for this offline — a pre-AWS_ENDPOINT_URL SDK ships no @smithy/core and names the variable in zero files, a modern one names it there — and skips with that reason rather than run a test that would call the account. This is the only sample here whose gate depends on how its dependencies were installed.

typescript/async-lambda-dynamodb left this list earlier on 2026-11-17 for a different reason worth keeping: it had been vendored with no gate at all while this document described it as "not yet attempted". Its gate needed one non-obvious thing — the sample's own integration test imports uuid, but neither package.json declares it (only @types/uuid, which ships declarations and no implementation), so npm ci alone leaves the suite failing with Cannot find module 'uuid' before any assertion. The gate installs that one module with npm install --no-save, touching neither package.json nor any source file.

The Java SDK-version evidence for the cross-cut above is in the SDK-pin section.

Service-integration Tasks: fixed 2026-11-17

Found while checking whether integrated-application-test-kit could be probed, and it is the kind of defect that matters more than a missing operation: a Task whose Resource named a service integration succeeded without calling it. An execution reported SUCCEEDED, the history showed TaskSucceeded naming sqs:sendMessage, and nothing had been sent.

Fixed in stepfunctions/integrations.py (new) plus the integrate hook the interpreter now takes:

SendMessage response (MessageId, MD5OfMessageBody) rather than the Task's own parameters echoed back.

fires.

whose cause names the resource. That is the rule lambda_api/integrations.py already applies to API Gateway — refuse rather than answer 200 while writing nothing — and the reason is the same: a green run that performed no side effect is worse than a red one.

function:something-local) still succeeds locally, which is what a definition that only asserts control flow needs.

The $$ context object also landed with this work: $$.Execution.Id, $$.StateMachine.Name and $$.Task.Token resolve, the last minted fresh per Task invocation. The store builds $$.Execution.Id from the persisted execution row rather than synthesising it, because a resumed execution must report the same id as the first drive — a synthesised one would change across a suspend and a definition that carried it into a Task's parameters would record two ids for one execution.

Pinned by tests/test_stepfunctions_integrations.py (delivery and refusal) and tests/test_stepfunctions_unmodelled.py (context, .sync, retry count, distributed-Map boundary). The three delivery tests were red first — the queue stayed empty, the MessageId was missing, and the rule never fired — and the refusal tests were red in the other direction (executions reported SUCCEEDED).

What this does not fix. .sync is refused rather than approximated. .waitForTaskToken now makes its call with a real token, but the run does not suspend for SendTaskSuccess — so a definition that depends on the callback naming a result still reads false, which is exactly what stops integrated-application-test-kit's workflow from being a meaningful probe. dynamodb:putItem and aws-sdk:* are refused rather than implemented. Those are the next items, not this one.

Why this document exists

The next session should not re-derive any of it. Two rules it encodes:

  1. Recount the denominator from the tree. "38" was wrong by five.
  2. A blocker is a quote from a sample file, not a guess. Every row above

cites the file it came from.


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