Quick revision
The short answer
I would treat lock-in as a measurable risk, not a feeling: estimate what leaving would cost in data volume, re-modelling of access patterns, and replacing features like Streams, global tables and TTL, then weigh that against what DynamoDB saves us in operations staff, scaling and availability. Where it is cheap, I reduce the exit cost with repository layers, regular exports to open formats and documented access patterns, and I report to the board with a concrete exit scenario and a cost estimate.
What to remember
In this answer, we treated DynamoDB lock-in as an exit cost we can estimate: data volume, access-pattern-specific models, and features like Streams, global tables and TTL. We weighed it against the operations work DynamoDB removes, reduced it where cheap with repository layers, regular exports and documented access patterns, treated compatible APIs as something to test only within a real exit plan, and reported a concrete scenario with numbers to the board.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would treat lock-in as a measurable risk, not a feeling: estimate what leaving would cost in data volume, re-modelling of access patterns, and replacing features like Streams, global tables and TTL, then weigh that against what DynamoDB saves us in operations staff, scaling and availability. Where it is cheap, I reduce the exit cost with repository layers, regular exports to open formats and documented access patterns, and I report to the board with a concrete exit scenario and a cost estimate.
Why this question is asked
Boards ask about vendor lock-in because it sounds like an uncontrolled risk: one supplier could raise prices, change terms or suffer an outage, and the company could not leave. A principal engineer's job is to turn that worry into numbers the board can weigh, and to spend just enough effort on reducing the risk. Interviewers ask this question to see whether we can reason about a strategic trade-off without either dismissing it or recommending an expensive migration out of fear. In this answer, we will define what lock-in really means for DynamoDB, quantify the exit cost, weigh it against the benefits, look at cheap ways to reduce it, and see how to report it.
1What Lock-In Means for a DynamoDB System
Lock-in is not the same as dependence. Every company depends on its database. Lock-in is the cost and time it would take to move to something else. For DynamoDB that cost comes from three places.
The first is the data itself: how many terabytes, and how long it takes to copy them while the system keeps running. The second is the data model. A DynamoDB design is shaped around specific access patterns, partition keys and sort keys chosen so each request is one Query. A relational database or another NoSQL store would need a different model, and so would the code that reads it. The third is the surrounding features. DynamoDB Streams feed other services with change events, global tables replicate across regions with last-writer-wins conflict handling, TTL deletes expired items for free, and IAM policies control access per item. None of these has an exact equivalent elsewhere, so each needs a replacement design.
2Quantifying the Exit Cost
I would build an inventory per system and give each item a rough size. A simple table makes it concrete enough for a board discussion.
| Item | Size | Exit work (estimate) |
|---|---|---|
| Order tables | 40 TB, 6 tables | copy with dual writes, about 8 weeks |
| Access patterns | 34 patterns | re-model and re-test, 2 engineers x 3 months |
| DynamoDB Streams | 5 consumers | replace with CDC to Kafka, 6 weeks |
| Global tables | 2 regions | new replication design, hardest item |
| TTL | 3 tables | scheduled delete jobs, 1 week |
| Operations staff | none today | 2 to 3 database engineers per year after exit |
Notice the last row. Leaving DynamoDB does not only cost a migration project; it adds a permanent running cost, because a self-managed or differently managed database needs people for upgrades, backups, capacity and incidents.
3Weighing It Against the Benefits
The honest comparison is not 'locked in or free', but 'expected cost of staying' against 'expected cost of leaving or of keeping the option to leave'. DynamoDB gives us no servers to patch, automatic scaling, multi-AZ replication, point-in-time recovery and a published availability commitment. Replacing that would cost engineers and on-call time every year.
So I would ask what event would actually make us leave. A large price change, a regulatory requirement to run in another cloud or on premises, or an acquisition by a company on another provider are realistic triggers. For each, I estimate how likely it is and how quickly we would have to move. If the likely trigger gives us a year's notice, a planned migration is affordable and we do not need to pay for portability today. If a regulator could force a move within months, we need more preparation now.
4Reducing Lock-In Where It Is Cheap
Some measures cost little and lower the exit cost a lot. The first is a repository layer in code: services talk to an OrderRepository interface, and only its implementation knows about the DynamoDB SDK. That does not make the data model portable, but it confines the change to one module per service.
The second is regular exports to open formats. DynamoDB can export a table to S3 in DynamoDB JSON or Ion format, which we can convert to Parquet. A monthly export doubles as a disaster recovery copy and an analytics source, so it pays for itself even if we never leave. The third is documentation: a list of every access pattern with its key design. That document is the specification a migration team would need first, and it also helps new engineers today.
What I would avoid is building a generic database abstraction that hides DynamoDB's strengths, or running a second database in parallel 'just in case'. Both cost every day and rarely make a real exit easier.
5Compatible Options and How to Report the Risk
Some systems offer a DynamoDB-compatible API. ScyllaDB's Alternator, for example, accepts many DynamoDB API calls, which could shorten a migration for simple tables. But compatibility varies by feature, so I would evaluate it only as part of a real exit plan, with a proof of concept on our own tables, not cite it as a guarantee.
For the board I would present one concrete scenario, such as 'we must move the order platform to another provider within 12 months', with the estimated cost, the timeline, the risks and the measures we already take. Then I would state the recommendation: stay, keep the cheap mitigations, and review the estimate yearly. A board can act on a number and a scenario; it cannot act on general fear.
- Inventory systems on DynamoDBdata, patterns, features
- Estimate exit cost per systemengineer months, running cost
- Estimate benefits of stayingops staff, availability
- Realistic forced-exit trigger?regulation, acquisitionYesPrepare a tested exit planNoKeep cheap mitigations only
- Report scenario and numbersreview yearly
5 steps in order. Play them, or step through them one at a time.
6Follow-up questions
Is multi-cloud the answer to lock-in?
Rarely for a database. Running the same system on two clouds doubles the operational work and forces us onto the lowest common features. It makes sense when a regulation or a large customer requires it, not as a general insurance policy.
Does using DynamoDB through Spring Data or a repository layer remove lock-in?
It reduces the amount of code to change, but the data model and features like Streams and TTL remain DynamoDB-specific. The bigger exit cost is usually re-modelling and moving data, not changing method calls.
How often should the assessment be repeated?
Once a year, and whenever something material changes, such as a large new system on DynamoDB, a price change, or a new regulatory requirement.
7Conclusion
In this answer, we treated DynamoDB lock-in as an exit cost we can estimate: data volume, access-pattern-specific models, and features like Streams, global tables and TTL. We weighed it against the operations work DynamoDB removes, reduced it where cheap with repository layers, regular exports and documented access patterns, treated compatible APIs as something to test only within a real exit plan, and reported a concrete scenario with numbers to the board.
Open with
I would start by turning the worry into an estimate. For each system on DynamoDB I would list the data volume, the access patterns the key design is built around, and the DynamoDB-specific features we use, such as Streams, global tables, TTL and fine-grained IAM, because those have no exact equivalent elsewhere and each needs a replacement design.
Then, if they want more
That gives an exit cost in engineer months plus a running cost, since leaving means we would need people to operate a database. Then I would weigh it against what DynamoDB gives us: no database operations staff, scaling and availability.
Often the conclusion is that leaving is not worth it unless something forces us, so I would identify realistic triggers, like regulation or an acquisition, and how much notice they would give.
Meanwhile I would take the cheap measures: keep DynamoDB behind repository layers in code, run regular exports to S3 in an open format, which also helps analytics and recovery, and document every access pattern. I would only evaluate compatible options, like ScyllaDB's DynamoDB-compatible API, as part of a real exit plan with a proof of concept.
To the board I would present one concrete scenario with cost and timeline, and a recommendation, not general fear.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Cassandra documentation, Amazon DynamoDB developer guide
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "DynamoDB offers speed and low operations, but ties the company deeply to one cloud...": https://scrivio-interview-library.netlify.app/databases/cassandra-and-dynamodb/17e2e0412c/