Which Files Fit the Cosmos DB for NoSQL 2 MB Item Limit?
You create an Azure Cosmos DB for NoSQL database. You plan to use the Azure Cosmos DB .NET SDK v3 API for NoSQL to upload the following files: You receive the following error message when uploading the files: “413 Entity too large”. You need to determine which files you can upload to the Azure Cosmos DB for NoSQL database. Which files can you upload? - 
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests whether you know the Cosmos DB for NoSQL per-item size limit (2 MB) versus the 2 GB logical partition limit — the trap is treating the 2 MB cap as a batch total and concluding only the single smallest file qualifies.
Azure Cosmos DB for NoSQL caps a single item at 2 MB, so uploading a document larger than that returns "413 Entity too large" from the .NET SDK v3. Working through the file table, only File1 and File2 stay under that per-item ceiling, which makes option B the answer.
Picking E (File1 only) by assuming the 2 MB limit applies to the combined upload batch, so that File1 plus File2 would exceed it — but the cap applies to each individual item, not the sum of documents.
Community Discussion (9 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Azure Cosmos DB for NoSQL enforces a hard per-item limit of 2 MB, measured as the UTF-8 byte length of the JSON representation of the document. Looking at the file table, File1 and File2 are the only entries whose documents stay at or below that 2 MB ceiling; everything above it fails at write time with the "413 Entity too large" error returned by the.NET SDK v3. Option B is therefore the set of files that can actually be uploaded — a partial success with the remaining files rejected is exactly the behaviour the error message describes. Note that this is separate from the 2 GB logical partition key limit, which governs how much data a partition can hold, not how large one document may be.
Why the Other Options Are Wrong
Option A assumes all five files upload, which contradicts the 413 error the uploader already received. Options C and D include File3 and File4, which exceed the per-item cap and would be rejected on insert. Option E (File1 only) is the most tempting distractor: it treats 2 MB as a budget shared across the batch, but Cosmos DB charges that limit against each individual item, so File2 is perfectly valid on its own. Community answers split exactly along this line — one learner reasoned "the total size for File1 and File2 will be 3 MB", while another correctly noted "Maximum size of an item = 2 MB (UTF-8 length of JSON representation)".
Community Comment Notes
The dominant community position matches the per-item reading: Jedi cites the 2 MB limit and links the Cosmos DB limits documentation, and emysa341 simply states the answer is B. MasonZ reinforces the point by quoting the documentation line that "Azure Cosmos DB limits single request's size to 2MB" from the Data Factory connector page, and Ushakanth summarises it as each file having a maximum size of 2 MB so "File 1, File 2 Only can be uploaded". The dissenting camp, including sky_may and AzDeveloper, applies the 2 MB figure to the combined request and argues for E or a reduced batch — a valid concern for stored-procedure or batch writes, but not for individual document uploads via the SDK. One learner also reported passing the exam with this answer, which is consistent but not by itself proof.
Official Reference
Exam Strategy
When a Cosmos DB question mentions an error code like 413, immediately translate it into the documented numeric limit: 2 MB per item, 2 GB per logical partition, 50 GB per container by default. Then check each option against the per-item figure rather than the sum of a batch, since AZ-204 distractors almost always exploit that confusion.
Frequently Asked Questions
Does the Cosmos DB for NoSQL 2 MB limit apply per document or to the whole upload batch?
It applies per item (per document), measured as UTF-8 JSON length. Stored-procedure and transactional batch requests are also capped at 2 MB, but that does not reduce the size allowed for a single document.
Why do some learners answer File1 only for this 413 error?
They treat 2 MB as a shared budget for the whole batch, so File1 plus File2 would exceed it. Because the cap is per document, File2 is valid on its own and option E is too restrictive.
Could these larger files be stored in Cosmos DB for MongoDB instead?
Yes. Cosmos DB for MongoDB supports documents up to 16 MB, which is one reason the NoSQL API's 2 MB per-item limit surprises candidates who have only used the MongoDB API.