I Tried Running Strands Decider 2B on AWS Lambda

I Tried Running Strands Decider 2B on AWS Lambda

I ran Strands Decider 2B on Lambda (CPU) and Lambda Managed Instances (GPU). CPU works but is slow, averaging about 3.3 seconds in-server. GPU took about 0.54 seconds, roughly one-sixth of the CPU time.
2026.11.26

This page has been translated by machine translation. View original

Introduction

Strands Decider 2B is a small, judgment-only model released by AWS's Strands Labs. It does not generate text; instead, it returns which of the given options applies, along with probabilities.

https://dev.classmethod.jp/articles/strands-decider-2b-m4-mac-kiro-crew/

Lambda Managed Instances (LMI) Event Functions (conventional Lambda) added support for GPU instances on November 18, 2026.

https://aws.amazon.com/blogs/aws/aws-lambda-now-supports-gpu-instances-for-event-functions-on-lambda-managed-instances/

This time, I will present the results of running Strands Decider 2B on an LMI GPU function, and, for comparison, on a Lambda CPU function as well.

Test Environment

  • Region: Tokyo (ap-northeast-1)
  • Repository: commit 6d85079c of strands-labs/strands-decider (November 23, 2026)
  • CDK execution: Docker with node:22
  • Invocation: aws lambda invoke (qualifier is live)
Item CPU function GPU function
Execution environment arm64 LMI, g4dn.xlarge (T4, 16 GB GPU memory)
Inference engine llama.cpp (Q8_0) torch + CUDA (no quantization)
Memory 10,240 MB 4,096 MB
Model hobson-v19 (Hugging Face commit d8b5ad77), qwen3.5-v1-2610 (same, 4d27d8d7) qwen3.5-v1-2610

The CPU function's timeout is 15 minutes. The GPU function has accelerator_memory_gb of 16, max_vcpus of 12, per_env_max_concurrency of 4 (default), and minExecutionEnvironments of 1 (set by the stack).

Lambda (CPU) Function

The official deploy/lambda stack creates an arm64 Lambda function from a container image containing llama.cpp and a Q8_0 GGUF.

Deployment

In the deploy/lambda directory, specify the model to deploy with -c model. hobson-v19 is the same model as in the previous article, and qwen3.5-v1-2610 is the model used for comparison with the GPU function.

npx cdk deploy --require-approval never -c model=StrandsAgents/strands-decider-2B-hobson-v19
npx cdk deploy --require-approval never -c model=StrandsAgents/strands-decider-2B-qwen3.5-v1-2610

The image build (CodeBuild) took 5 minutes 52 seconds for hobson-v19 and 5 minutes 53 seconds for qwen3.5-v1-2610. The cdk deploy Deployment time was 462.03 seconds for hobson-v19 and 461.67 seconds for qwen3.5-v1-2610.

First Invocation

I saved the following minimal request as readme-request.json.

{"state": "Help! My payouts have been failing for 3 days!",
 "questions": {"is_urgent": {"type": "noul", "instructions": "Does this convey urgency?"}}}

I invoked the function right after deployment, adding --cli-read-timeout 900.

time aws lambda invoke --function-name <関数名> --qualifier live --cli-binary-format raw-in-base64-out --cli-read-timeout 900 --payload file://readme-request.json answer.json; cat answer.json
{
    "StatusCode": 200,
    "ExecutedVersion": "1"
}

real	5m20.571s
user	0m0.349s
sys	0m0.032s
{"model": "strands-decider-2B-hobson-v19-q8_0", "answers": {"is_urgent": {"type": "noul", "noul": 0.8238}}, "usage": {"input_tokens": 86, "output_tokens": 1}, "latency_ms": 311980.57}

In the function's logs, the model load (model read in) took 304.1 seconds for hobson-v19 and 291.6 seconds for qwen3.5-v1-2610.

Lambda Managed Instances (GPU) Function

The official deploy/lambda-gpu stack creates a GPU function from a torch + CUDA x86_64 image. It bakes the same Hugging Face checkpoint as the CPU function into the image without quantization.

Deployment

The GPU function runs qwen3.5-v1-2610. In the deploy/lambda-gpu directory, I deployed by specifying the instance type, accelerator memory, vCPU limit, and AZs.

npx cdk deploy --require-approval never --no-rollback -c model=StrandsAgents/strands-decider-2B-qwen3.5-v1-2610 -c instance_types=g4dn.xlarge -c accelerator_memory_gb=16 -c max_vcpus=12 -c availability_zones=ap-northeast-1a,ap-northeast-1c,ap-northeast-1d

The Deployment time was 1,429.53 seconds (about 24 minutes). The main segments were 9 minutes 24 seconds for the image build, 7 minutes 50 seconds for creating the function, and 5 minutes 20 seconds for creating the version. Version activation (instance startup and execution environment initialization) completed during the deployment.

First Invocation and Instance Startup

After version activation was done, I made the first invocation with the same command and readme-request.json as for the CPU function.

{
    "StatusCode": 200,
    "ExecutedVersion": "1"
}

real	0m0.778s
user	0m0.332s
sys	0m0.026s
{"model": "checkpoint", "answers": {"is_urgent": {"type": "noul", "noul": 0.8575}}, "usage": {"input_tokens": 86, "output_tokens": 1}, "latency_ms": 318.64}

The execution environment initialization of $LATEST.PUBLISHED had a durationMs of 62165.883 (about 62 seconds) in platform.initReport in the function's logs. The startup log shows warmed up in 52.4 s. The execution environment of version 1 showed warmed up in 49.6 s.

At the time of activation, two g4dn.xlarge instances were launched ($LATEST.PUBLISHED in ap-northeast-1a, version 1 in ap-northeast-1d).

Measurement with 20 Questions

Measurement Method

The 20 Japanese questions from the previous article ask the model to judge the difficulty of a request to an AI coding assistant in three tiers: simple, medium, and complex. I converted these 20 questions to the B_desc format from the previous article (a form where each tier option includes a description), and sent them one at a time in order with aws lambda invoke. Before each condition, I made one warm-up invocation and excluded its result from the aggregation. I sent the 20 questions for 2 rounds, so there were 40 samples per condition. As an example, here is the request for P05.

P05 Request
{"state": {"message": "A案とC案は進めていい。B案は影響範囲を調べてから決めたいので、まず調査結果だけ出して"},
 "questions": {"tier": {"type": "choice", "instructions": "How hard is this request for an AI coding assistant? Answer one of: simple = a short, local, mechanical request answerable in one step -- a rename, a lookup, a small edit, a direct factual question; medium = ordinary work over a few files or steps -- write a function, explain some code, fix a bug whose cause is already named; complex = work needing a plan, a trade-off or reasoning across a whole system -- design, architecture, a diagnosis with no named cause, a risky refactor. Being wrong in the two directions does not cost the same. A turn put in a lower tier than it needs gets less room to work in and a worse answer; a turn put higher only costs more. So answer simple only when the request is self-contained and you can see the whole of it -- a request that is a plan, a judgement call, several instructions at once, or that names work you cannot see, is not simple however short it is.", "criteria": {"simple": "a short, local, mechanical request answerable in one step -- a rename, a lookup, a small edit, a direct factual question", "medium": "ordinary work over a few files or steps -- write a function, explain some code, fix a bug whose cause is already named", "complex": "work needing a plan, a trade-off or reasoning across a whole system -- design, architecture, a diagnosis with no named cause, a risky refactor"}}}}

I recorded response time as two values. wall_ms is the time from launching aws lambda invoke until it finishes, and includes AWS CLI startup. latency_ms is the value in the response JSON, and is the time inside the server.

Response Time

The unit of response time is ms. Within expectation is the number of samples that fell within the range of expected answers set in the previous article.

Condition Count Errors latency_ms mean latency_ms median latency_ms max wall_ms mean Within expectation
Lambda CPU (hobson-v19) 40 0 3,262.7 2,910.7 6,230.4 3,683.6 40/40
Lambda CPU (qwen3.5-v1-2610) 40 0 3,252.5 2,913.3 6,188.9 3,670.1 38/40
LMI GPU (qwen3.5-v1-2610, g4dn.xlarge) 40 0 536.6 464.6 1,073.3 955.6 38/40

Comparing with the same qwen3.5-v1-2610, the GPU's mean latency_ms was about 1/6 of the CPU's, and its mean wall_ms was about 1/3.8. The difference between wall_ms and latency_ms was about 0.42 seconds in all three conditions.

Judgment Results

The number within expectation per round was 20/20 for the hobson-v19 CPU function, and 19/20 for the qwen3.5-v1-2610 CPU and GPU functions. In both qwen3.5-v1-2610 conditions, P15 was judged as complex, falling outside the expected range.

qwen3.5-v1-2610 returned the same tier for all 20 questions on the CPU function and the GPU function. In every condition, the tiers of the first and second rounds were the same for all 20 questions.

The tiers differed between hobson-v19 and qwen3.5-v1-2610 for the following three questions.

Question hobson-v19 qwen3.5-v1-2610
P15 medium complex
P16 medium simple
P19 complex medium

Teardown

I tore it down with cdk destroy.

npx cdk destroy --force -c model=StrandsAgents/strands-decider-2B-qwen3.5-v1-2610 -c instance_types=g4dn.xlarge -c accelerator_memory_gb=16 -c max_vcpus=12 -c availability_zones=ap-northeast-1a,ap-northeast-1c,ap-northeast-1d

Summary

I confirmed that Strands Decider 2B can be used on Lambda.

The CPU function also worked with a 10 GB memory allocation. It is usable for verification where latency and the like do not matter.

With the GPU function, the mean latency_ms was 536.6 ms, about 1/6 of the CPU function's, confirming the effect of the GPU. Although the conditions differ, the response time was close to that of the M4 Mac GPU (379 ms) in the previous article.

When you want to run Strands Decider 2B judgments on AWS, please try Lambda as a candidate as well.

Share this article

AWSのお困り事はクラスメソッドへ