Shipping a vision-model verdict on Bedrock and Lightsail
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
Practical walkthrough of deploying a vision model on AWS Bedrock and Lightsail, directly actionable for cloud/AI work.
A 285-line FastAPI app on Python 3.13 deployed to Amazon Lightsail (nano, scale 1) uses Bedrock's Converse API with toolConfig and toolChoice to force Nova Lite into returning a boolean verdict for dog detection, eliminating free-text parsing ambiguity. The author highlights three AWS-specific pitfalls: Lightsail containers lack IAM task roles (requiring env-var access keys), cross-region inference profiles must match the policy's pinned region, and arm64 images crash-loop silently with an exec format error unless --platform linux/amd64 is set. The fixture set scores 20/20 with a median 880 ms per scan, and a mock mode enables frontend development without credentials or model access.