hardMultiple ChoiceObjective-mapped
MLA-C01 IAM Policy Evaluation Practice Question
Exhibit
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sagemaker:CreateModel",
"Resource": "arn:aws:sagemaker:us-east-1:123456789012:model/*"
},
{
"Effect": "Deny",
"Action": "sagemaker:CreateEndpointConfig",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"sagemaker:VpcSubnets": "subnet-0123456789abcdef0"
}
}
},
{
"Effect": "Allow",
"Action": "sagemaker:CreateEndpoint",
"Resource": "*"
}
]
}An AWS IAM policy is attached to a role used by a CI/CD pipeline to deploy SageMaker endpoints. The policy includes: - An Allow statement for sagemaker:CreateEndpointConfig on all resources. - A Deny statement for sagemaker:CreateEndpoint on all resources with a condition that the VPC subnet must not equal subnet-0123456789abcdef0 (StringNotEquals on ec2:Subnet). The pipeline attempts to create an endpoint configuration with a VPC subnet that is not subnet-0123456789abcdef0. What will happen when the pipeline tries to create the endpoint configuration?
⚠ Common exam trap
Candidates may mistakenly think the Deny statement applies to all SageMaker actions, but it explicitly targets CreateEndpoint. The subnet condition only affects CreateEndpoint, leaving CreateEndpointConfig unrestricted.
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
✓
The action will be allowed because the policy lacks a Deny on the subnet condition for the endpoint resource.
The policy has an explicit Allow for sagemaker:CreateEndpointConfig without any conditions, so the action is allowed. The Deny statement applies only to sagemaker:CreateEndpoint, not to CreateEndpointConfig. Therefore, even if the subnet does not match, the CreateEndpointConfig request is allowed. Option D is correct because the policy lacks a Deny on the subnet condition for the endpoint configuration resource.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The action will be denied because the Deny statement explicitly blocks CreateEndpointConfig when the subnet does not match.
Why it's wrong here
This option assumes an explicit Deny exists in the policy. Without the exhibit, we cannot confirm, but typically if a Deny existed, it would override. However, the correct answer is D because the policy lacks a Deny.
- ✗
The action will be allowed because the CreateEndpoint statement allows all endpoints.
Why it's wrong here
The CreateEndpoint statement only applies to the endpoint resource, not the endpoint configuration. Therefore, it does not allow CreateEndpointConfig.
- ✗
The action will be allowed only if the endpoint configuration uses a VPC with multiple subnets.
Why it's wrong here
There is no condition or dependency on multiple subnets in the scenario. The policy would not allow based on subnet count.
- ✓
The action will be allowed because the policy lacks a Deny on the subnet condition for the endpoint resource.
Why this is correct
Without an explicit Deny on the specific subnet condition for CreateEndpointConfig, the action is allowed if an Allow statement exists. The default IAM behavior is to deny, but if there is an Allow without a restricting condition that fails, the action is permitted. The policy lacks a Deny, so the request is allowed.
Visual reference
Go deeper
Related to this question
About these practice questions
This MLA-C01 question is part of Courseiva's 835-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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLA-C01 practice question is part of Courseiva's free Amazon Web Services 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 MLA-C01 exam.