{"slug": "run-amazon-bedrock-locally-with-real-completions-from-ollama", "title": "Run Amazon Bedrock locally, with real completions from Ollama", "summary": "MiniStack 1.4.0 introduces four new services that emulate Amazon Bedrock end-to-end, providing deterministic mock responses for Converse and InvokeModel APIs. A new environment variable allows the mock to be replaced with a real LLM backend via an OpenAI-compatible endpoint, enabling local development with actual completions from models like Ollama.", "body_md": "MiniStack 1.4.0 ships four new services that emulate Amazon Bedrock end to end, and one env var that turns the mock into a real LLM backend.\n\nOut of the box, Converse and InvokeModel return deterministic mock responses whose wire shape matches the model family you asked for. Anthropic, Titan, Nova, Llama, Mistral, Cohere and AI21 each have distinct response schemas, and MiniStack selects the right one by model ID prefix. Streaming operations (ConverseStream, InvokeModelWithResponseStream) use the real eventstream wire format, so your SDK's streaming parser runs exactly as against AWS.\n\nThat means your test suite exercises the real code paths: request building, response parsing, stream handling. No network call, no API bill.\n\nOne honest caveat: token counts are a chars/4 heuristic. Shape-correct, but don't assert exact values against a mock.\n\n```\ndocker run -p 4566:4566 \\\n  -e MINISTACK_BEDROCK_PROXY_URL=http://host.docker.internal:11434/v1 \\\n  ministackorg/ministack\n```\n\nWith the proxy set to any OpenAI-compatible /chat/completions endpoint (Ollama, llama.cpp, vLLM), MiniStack translates your Bedrock prompt to OpenAI shape, forwards it, and translates the response back into Bedrock shape:\n\n```\nbedrock = boto3.client(\"bedrock-runtime\", endpoint_url=\"http://localhost:4566\",\n                       region_name=\"us-east-1\", aws_access_key_id=\"test\",\n                       aws_secret_access_key=\"test\")\nresp = bedrock.converse(\n    modelId=\"anthropic.claude-3-5-sonnet-20240620-v1:0\",\n    messages=[{\"role\": \"user\", \"content\": [{\"text\": \"Hello from MiniStack!\"}]}],\n)\nprint(resp[\"output\"][\"message\"][\"content\"][0][\"text\"])  # a real completion\n```\n\nUnchanged AWS SDK. Real model. Zero cloud.\n\nIf the proxy endpoint is unreachable, MiniStack falls back to the mock silently. Your CI doesn't care whether Ollama is running.\n\nAll four services are account and region scoped (1.4.0 also shipped multi-region support, separate post).\n\nThe Bedrock work was led by dcabib.\n\n```\ndocker run -p 4566:4566 ministackorg/ministack\n```\n\nMIT, free forever. Changelog: [https://ministack.org/blog/changelog-v1-4-0.html](https://ministack.org/blog/changelog-v1-4-0.html)", "url": "https://wpnews.pro/news/run-amazon-bedrock-locally-with-real-completions-from-ollama", "canonical_source": "https://dev.to/nahuel990/run-amazon-bedrock-locally-with-real-completions-from-ollama-223k", "published_at": "2026-07-09 12:15:03+00:00", "updated_at": "2026-07-09 12:35:44.065560+00:00", "lang": "en", "topics": ["developer-tools", "large-language-models", "ai-infrastructure"], "entities": ["MiniStack", "Amazon Bedrock", "Ollama", "Anthropic", "Titan", "Nova", "Llama", "Mistral"], "alternates": {"html": "https://wpnews.pro/news/run-amazon-bedrock-locally-with-real-completions-from-ollama", "markdown": "https://wpnews.pro/news/run-amazon-bedrock-locally-with-real-completions-from-ollama.md", "text": "https://wpnews.pro/news/run-amazon-bedrock-locally-with-real-completions-from-ollama.txt", "jsonld": "https://wpnews.pro/news/run-amazon-bedrock-locally-with-real-completions-from-ollama.jsonld"}}