Agents for Humans: a deployment jungle — App Runner closed, Function URL 403s, and hand-rolling the AgentCore contract
Field notes from building Standing Order for the AWS Agents for Humans Hackathon,
part 3 of 3.
Everything in this post happened in one afternoon on a brand-new AWS account.
I'm writing it down because every obstacle was undocumented at the moment I
hit it, and each workaround is reusable.
Setback 0: the Bedrock use-case form, submitted via API
Before deployment even started, my Anthropic model access broke. Morning
smoke tests had worked; by afternoon every call failed:
ResourceNotFoundException: Model use case details have not been submitted for
this account. Fill out the Anthropic use case details form before using the
model. If you have already filled out the form, try again in 15 minutes.
The console path is a web form, but it turns out the CLI can do it:
aws bedrock get-use-case-for-model-access # confirms: form not filled
FORM='{"companyName":"...","companyWebsite":"...","intendedUsers":"1",
"industryOption":"Technology","otherIndustryOption":"","useCases":"..."}'
aws bedrock put-use-case-for-model-access --form-data "$(printf '%s' "$FORM" | base64)"
The --form-data payload is base64-encoded JSON. Access came back within the
promised 15 minutes — I polled with a one-line converse call every 3 minutes.
Meanwhile development continued, because the rule compiler is injected behind
an interface with a deterministic template fallback. Design for the outage
before the outage.
Setback 1: App Runner is closed
The plan said "single container on App Runner." App Runner stopped accepting
new customers in April 2026 — the console shows the notice, and no amount of
IAM policy changes that. If your architecture doc predates that shutdown,
re-verify it; ours did, and the fallback assumption silently died.
New target: Lambda container image + the AWS Lambda Web Adapter. The
adapter is one Dockerfile line and works with an unmodified FastAPI app:
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.1 /lambda-adapter /opt/extensions/lambda-adapter
ENV PORT=8080 AWS_LWA_READINESS_CHECK_PATH=/api/metrics
CMD ["python", "-m", "uvicorn", "src.api.server:app", "--host", "0.0.0.0", "--port", "8080"]
Outside Lambda the extension is inert, so the same image runs locally with
plain docker run . The container serves both the API and the statically
exported Next.js UI from one process — fully scale-to-zero, which mattered
because the hackathon credit hadn't landed yet and idle cost was going on a
card. One shell trap along the way: in zsh, docker push $ECR:latest mangles
the tag because :l is a history modifier. Write ${ECR}:latest .
Setback 2: the Function URL that 403'd everything
Function created, direct invoke green ( aws lambda invoke with an
HTTP-shaped payload returned my API's 200 through the adapter). Then:
aws lambda create-function-url-config --function-name standing-order --auth-type NONE
aws lambda add-permission --action lambda:InvokeFunctionUrl --principal '*' \
--function-url-auth-type NONE ...
curl https://<id>.lambda-url.us-east-1.on.aws/
# 403 {"Message":"Forbidden"} x-amzn-ErrorType: AccessDeniedException
The resource policy was verifiably correct ( get-policy showed the allow
statement, condition and all). I waited out propagation, recreated the
permission console-style — still 403. The decisive experiment: a
SigV4-signed request from an identity holding AWSLambda_FullAccess also got
403. When the signed request fails too, it's not your resource policy; the
endpoint itself is refusing the account. The tell was in
aws lambda get-account-settings :
"AccountLimit": { "ConcurrentExecutions": 10 }
Ten, not a thousand — a fresh account still inside its verification window,
with restrictions that aren't itemized anywhere I could find. Rather than wait
on an invisible timer, I went around it: API Gateway HTTP API in front of
the same function.
aws apigatewayv2 create-api --name standing-order --protocol-type HTTP \
--target arn:aws:lambda:us-east-1:<ACCOUNT_ID>:function:standing-order
aws lambda add-permission --principal apigateway.amazonaws.com \
--source-arn "arn:aws:execute-api:us-east-1:<ACCOUNT_ID>:<api-id>/*" ...
Two commands, worked on the first try, still per-request billing. The live
demo URL has been an API Gateway endpoint ever since; the dead Function URL
config is deleted. Total detour: about 40 minutes, most of it spent proving
the 403 wasn't self-inflicted.
Setback 3 that wasn't: AgentCore without the toolkit
Bedrock AgentCore Runtime deployment is a scored bonus, and the official
starter toolkit builds your container through CodeBuild — a service my IAM
user didn't have. Instead of chasing permissions, I read what the runtime
actually requires of a container. The contract is small:
-
POST /invocations — your entrypoint
The bedrock-agentcore Python SDK implements that contract in a few lines:
from bedrock_agentcore.runtime import BedrockAgentCoreApp
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload, context=None):
draft = propose_rule_draft(...) # the structured_output rule compiler
return {"draft": draft.model_dump(mode="json")}
Build with docker build --platform linux/arm64 , push to ECR, then create the
runtime pointing at the image, with an execution role trusting
bedrock-agentcore.amazonaws.com . One wrinkle: creating the runtime seconds
after creating the role fails with Role validation failed — plain IAM
eventual consistency. A retry loop with 15-second backoff succeeded on the
second attempt, the runtime went READY, and invoke_agent_runtime returned a
real Sonnet-4.6-compiled rule with fallback_used: false . From "no toolkit
permissions" to a live AgentCore runtime: roughly 40 minutes against a 6-hour
timebox. (One last CLI quirk: aws bedrock-agentcore invoke-agent-runtime
rejects non-ASCII payloads; boto3 doesn't care.)
What I'd tell you to keep
Verify platform assumptions the week you deploy, not the week you plan. When
public access fails, test with a signed request first — it splits "my policy
is wrong" from "the platform is refusing me" in one command. And when a
managed service's tooling wants permissions you don't have, check whether the
underlying contract is small enough to implement directly. Twice in one day,
it was.
Loading article