Picture a founder building a claims-review tool for physical therapy clinics, deciding whether to fine-tune a model on their own note data or just call an API and prompt their way to a demo. Now picture an established med-device company with the opposite question: it already has a working prototype built on a vendor API, and wants to know whether it now has to rebuild it in-house to pass a security review. Same decision, opposite directions. That decision, buy the capability, build it yourself, or glue several pieces together, is the first architecture decision most teams make, and it is the one that is hardest to undo six months later.
I'm Kody Doherty, a fractional CTO who works with founders shipping their first product and with companies adding AI to something that already has customers, revenue and, often, a compliance obligation. This is the decision I see teams get wrong most often, not because the engineering is hard, but because nobody names the third option until they are already stuck with the first two.
What buy, build and glue together actually mean here
Buying means paying a vendor for a finished capability, an API, a platform, a managed service, and adapting your product to fit it. Building means writing and owning the logic yourself, on your own infrastructure. Gluing together means combining two or more vendor services with your own connective code, your own data pipeline, or your own orchestration layer, so the system depends on none of them alone. Most real products end up somewhere on that spectrum, not at either end.
What changed, and why it moves the line
Amazon added Bedrock, its managed foundation-model service, to the AWS HIPAA Eligible Services Reference, meaning a signed AWS Business Associate Agreement now covers model inference through Bedrock the same way it covers S3 or RDS. That is a genuine change in what "buy" means for a health tech team: a foundation model call is no longer automatically outside a covered entity's compliance boundary.
Before this, a team that needed an LLM feature and had PHI in scope faced an ugly choice: send data to a vendor with no BAA and accept the risk, or spend months standing up your own model hosting just to keep data inside a covered boundary. That second path was a build decision forced by compliance, not by product need. AWS keeps extending that list too: Paubox reported the reference was updated on February 10, 2026, adding more Bedrock-adjacent services to the eligible set. The list is not static, and neither is the calculus that depends on it.
This does not make Bedrock a free pass. Eligibility under the BAA is necessary, not sufficient: you still have to configure the account correctly, keep PHI out of logs that fall outside the boundary, and prove it during an audit. I've written about the account-level controls that actually matter in HIPAA on AWS: BAAs, Encryption and Audit Config. The point here is narrower: a decision that used to force a build now has a legitimate buy path, and that changes which teams should even be considering the harder option.
When buying the capability outright is the right call
Buy when the capability is not your differentiator and a vendor already does it under a contract you can actually get, meaning a BAA, a data processing agreement, or a SOC 2 Type II report you can request. If your product's value is the workflow around the model, not the model itself, paying for inference and keeping your engineers on the workflow is usually the faster and cheaper path to a working product.
The failure mode on this side is not technical, it's contractual. Founders sign up for a vendor's free tier, ship a demo, close a deal with an enterprise buyer who asks for a signed BAA, and only then discover the vendor doesn't offer one at any price. Ask the compliance question before the product question, not after.
When building it yourself is worth the time
Build when the thing you'd otherwise buy is close to your core product, when no vendor's terms will pass your buyer's security review, or when the unit economics of a per-call vendor price break at your expected volume. A company processing a few hundred inferences a day has a very different calculation than one processing a few million.
Building is also the right call when you need control over exactly what data touches the model and exactly how it's logged, because a compliance auditor is going to ask you to show that control, not just describe it. That's a longer conversation than fits here, and I've covered the threat-modeling side of it in AI Security for Startups: A Practical Threat Model.
Gluing together: the option nobody names until it's the only one left
Gluing means a vendor model behind your own retrieval layer, your own data store, and your own guardrail code, so the system doesn't depend entirely on any single vendor's roadmap or terms. It is the default answer for most teams with fewer than twenty engineers, not a compromise between the other two, because it lets you buy the expensive, hard-to-build part while keeping the parts that touch sensitive data or differentiate your product under your own control.
The trap is treating the glue code as an afterthought. A retrieval pipeline that pulls patient records into a prompt is now part of your compliance boundary whether you planned for that or not, and it needs the same review as anything else that touches PHI. I go through the specific failure patterns, prompt injection through retrieved content among them, in Securing LLM Apps: Prompt Injection, Data Leakage, Guardrails.
How the choice changes your compliance scope
Each option puts a different set of things inside your audit boundary. Buying under a BAA keeps the model provider mostly out of your control list but puts the vendor's own attestations on your evidence pile. Building puts everything, including the model infrastructure, squarely inside your SOC 2 or HIPAA scope. Gluing splits the difference and usually ends up as the widest scope of the three, because you're accountable for the vendor, your own data pipeline, and the seam between them.
Seed-stage teams often try to defer this thinking until the audit is scheduled, which is backwards. I've written about what a first SOC 2 effort actually requires in SOC 2 for Seed Stage Startups: What It Takes, and the AWS-specific controls that come up repeatedly in SOC 2 on AWS: The Controls That Matter. The architecture decision and the compliance scope are the same decision, made at different desks, and treating them separately is how teams end up rebuilding a working product six months before an acquisition's due diligence.
A short way to make the call before you write any code
Ask four questions in order: is this capability your product's differentiator, or does it sit underneath it? Can you get the contract terms your eventual buyer will require, in writing, today? What does the vendor cost at ten times your current volume? And who, specifically, is accountable for the data that crosses the seam if you glue two services together? Most disagreements about build versus buy are actually disagreements about which of those four questions matters most for a given feature, and it's worth settling that before the architecture gets named in a diagram.
Decisions made this way carried through at IC-1 Solutions, whose engineering org grew to 200+ staff and $50M in revenue in two years, precisely because the early calls about what to own and what to rent held up under that growth instead of needing a rewrite. That kind of decision doesn't announce itself as important on the day you make it. It just gets expensive or cheap, later, depending on whether you got it right.
If you're weighing this decision for an AI feature right now, on your own infrastructure or someone else's, I work with teams through exactly this stage, from the first diagram through the audit that follows it. You can see how that engagement works on kodydoherty.com.
Frequently asked questions
Can I use AI models with patient data on AWS?
AWS lists Amazon Bedrock as HIPAA eligible, so models can be used under a BAA; the rest of your architecture still has to meet the HIPAA Security Rule.
Should I build my own model or use an API?
Usually start with an API under a BAA and keep the data and evaluation yours; fine-tuning comes later, if ever.
Does using AI change my compliance scope?
Yes: every service that touches the data is in scope, which is the main reason to keep the stack small.
Where to start
Already running AI in production? The Token Cost Cut ($4,500) measures cost per feature and cuts it without losing quality. For the HIPAA side, see Security and compliance. Cut AI token costs has the details, and every price is on the pricing page.