How to Copy an Amazon Comprehend Custom Model Across Accounts?
Short answer
B Create a resource-based IAM policy in Account A and use the Amazon Comprehend ImportModel API in Account B to copy the custom model.
Question
Which solution will meet this requirement with the LEAST development effort?
Key Takeaways
The question tests cross-account sharing of an Amazon Comprehend custom model; the trap is assuming model artifacts must be manually moved through S3 or replicated with a data-transfer service.
Amazon Comprehend custom models can be shared across AWS accounts in the same Region by using a resource-based IAM policy and the ImportModel API. This page establishes that option B is the least-development-effort solution, not S3 copying, DataSync, or a VPN.
Common mistake: Choosing Amazon S3 because it is commonly used to move ML artifacts ignores that Comprehend provides ImportModel with a resource-based IAM policy specifically for cross-account custom model copies, while S3 transfer adds manual work.
Expert Analysis
Why the Answer Is Correct
Amazon Comprehend provides the ImportModel API specifically to bring a custom model into an account, and AWS documentation states the source model can be in your AWS account or another one. The cross-account flow requires a resource-based IAM policy in Account A that grants Account B access to the model, then Account B calls ImportModel for the same Region. This uses managed Comprehend functionality, so the ML engineer does not need to move model artifacts manually or build networking infrastructure. Among the options, it is the only solution that directly performs a Comprehend custom model copy with minimal development effort. Saransundar's comment summarizes the export, resource-based policy, and ImportModel sequence.
Why the Other Options Are Wrong
Copying the model through Amazon S3 sounds plausible because S3 is common for artifacts, but it does not provide a Comprehend-aware import and forces manual artifact handling. AWS DataSync is a data transfer service for files and object storage, not a mechanism for replicating Comprehend custom models between accounts. A Site-to-Site VPN creates private network connectivity, which is unnecessary for an AWS API-based cross-account model share and does not itself copy the model. These alternatives either address the wrong layer or add significant operational work compared with ImportModel.
Community Comment Notes
GiorgioGss points to the ImportModel API documentation and quotes that "The source model can be in your AWS account or another one." Ranneh likewise says to use the Comprehend ImportModel API to share models between accounts within the same Region. dduenas shares the custom-copy import documentation link, reinforcing that this is the documented cross-account path. The comment consensus aligns with option B, and the official API behavior supports that verdict.
Official Reference
- https://docs.aws.amazon.com/comprehend/latest/APIReference/API_ImportModel.html
- https://docs.aws.amazon.com/comprehend/latest/dg/custom-copy-importing.html
These links open the official vendor documentation in a new tab.
Exam Strategy
For least-development-effort cross-account model sharing, look for a managed API plus a resource-based IAM policy rather than artifact copying or network setup. Options that require S3 transfers, DataSync, or VPNs add unnecessary work for an AWS service-to-service copy.
Frequently Asked Questions
Why is an S3 copy not the least-effort way to move a Comprehend custom model?
Does Comprehend ImportModel require both accounts to be in the same Region?
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
Saransundar 👍 4 Answered BAmazon Comprehend - ImportModel API to facilitate the transfer of custom models between AWS accounts. STEPS: 1. Exporting the model from Account A. 2. Creating a resource-based IAM policy in Account A to grant access to Account B. 3. Using the ImportModel API in Account B to import the model.
-
GiorgioGss 👍 2 Answered Bhttps://docs.aws.amazon.com/comprehend/latest/APIReference/API_ImportModel.html "The source model can be in your AWS account or another one."
-
Ranneh 👍 1 Answered Buse the comprehend importmodel API to share models between accounts within the same region
-
dduenas 👍 1 Answered Bhttps://docs.aws.amazon.com/comprehend/latest/dg/custom-copy-importing.html
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All MLA-C01 Questions
Access 115 questions with complete answers and detailed explanations.
View Full MLA-C01 Practice Test →