PMLE Serving and Scaling Models Practice Question
You are deploying a custom PyTorch model to a Vertex AI Endpoint for real-time inference. The model artifact is stored in a Cloud Storage bucket. Your security team requires that the model be served from a container that runs as a non-root user and has no network access except to the Vertex AI prediction service. Which deployment configuration should you use?
⚠ Common exam trap
The trap here is assuming that Vertex AI's pre-built containers automatically run as non-root or that network isolation alone is sufficient without controlling the container user.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Deploy the model using a custom container that sets the USER instruction to a non-root user in the Dockerfile, and configure the endpoint to use a private VPC with no external IP.
A custom container is necessary to control the user context, and deploying it in a private VPC with no external IP ensures network isolation. The pre-built container runs as root, and allowing an external IP breaks the network restriction. Thus, the configuration that combines a non-root custom container with a private VPC is the only one that satisfies both security requirements.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploy the model using a custom container that runs as root but configure the endpoint to use a private VPC with no external IP.
Why it's wrong here
Running the container as root fails the security team's requirement that the container run as a non-root user. Even though the private VPC provides network isolation, the user requirement is not satisfied. Custom containers give you control, but you must explicitly set a non-root user.
- ✗
Use the pre-built PyTorch container provided by Vertex AI and set the endpoint to use a private VPC with no external IP.
Why it's wrong here
The pre-built PyTorch container runs as root by default, which violates the non-root requirement. While the private VPC setting addresses network isolation, the container user requirement is not met. You cannot modify the user of a pre-built container without building a custom image.
- ✓
Deploy the model using a custom container that sets the USER instruction to a non-root user in the Dockerfile, and configure the endpoint to use a private VPC with no external IP.
Why this is correct
A custom container allows you to control the user and network settings. Setting USER to a non-root user in the Dockerfile satisfies the non-root requirement, and deploying the endpoint in a private VPC with no external IP restricts network access to only the Vertex AI prediction service. This meets both security constraints.
- ✗
Deploy the model using a custom container that sets the USER instruction to a non-root user, but allow the endpoint to have an external IP for easier debugging.
Why it's wrong here
While the container runs as non-root, allowing an external IP exposes the endpoint to the internet, violating the requirement of no network access except to the Vertex AI prediction service. The security team explicitly requires restricted network access, so an external IP is not acceptable.
Go deeper
Related to this question
About these practice questions
This PMLE question is part of Courseiva's 775-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.