mediumMultiple ChoiceObjective-mapped
AIF-C01 Practice Question: An IAM policy allows creation of SageMaker…
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sagemaker:CreateTrainingJob",
"Resource": "arn:aws:sagemaker:us-east-1:123456789012:training-job/*",
"Condition": {
"StringEquals": {
"sagemaker:VpcSecurityGroupIds": "sg-0123456789abcdef0"
}
}
}
]
}An IAM policy allows creation of SageMaker training jobs only if they use a specific VPC security group. A user tries to create a training job without specifying that security group. What will happen?
⚠ Common exam trap
Many candidates assume an optional API parameter means the IAM condition is also optional, but IAM conditions are strictly enforced regardless of whether the parameter is required by the API.
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 request will be denied with an AccessDenied error
IAM policies are evaluated before any AWS API action is executed. If the policy includes a condition that requires a specific VPC security group for SageMaker training jobs, and the user's request does not include that security group, the condition is not met, resulting in an explicit deny (AccessDenied error). AWS IAM denies the request by default if the condition in a policy is not satisfied, regardless of whether the condition is marked as optional in the API.
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 request will succeed but SageMaker will ignore the condition
Why it's wrong here
IAM enforces conditions; SageMaker does not ignore them.
- ✗
The request will succeed because the condition is optional
Why it's wrong here
Conditions in IAM are requirements, not optional.
- ✗
The request will be denied because the training job resource ARN is invalid
Why it's wrong here
The ARN is valid; the denial is due to the condition.
- ✓
The request will be denied with an AccessDenied error
Why this is correct
The IAM condition is not satisfied, so the request is denied.
Go deeper
Related to this question
About these practice questions
This AIF-C01 question is part of Courseiva's 619-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 AIF-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 AIF-C01 exam.