Question 838 of 1,748
Infrastructure SecurityhardMultiple ChoiceObjective-mapped

Using Service Control Policies to Enforce IAM Instance Profiles on EC2

This SCS-C02 practice question tests your understanding of infrastructure security. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

An organization has a multi-account AWS environment using AWS Organizations. The security team needs to ensure that no Amazon EC2 instances are launched without an IAM instance profile that includes a specific role. Which preventive control should be implemented?

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

Create an SCP that denies ec2:RunInstances when the condition iam:InstanceProfile is not set to the required profile ARN.

Option A is correct because AWS Organizations Service Control Policies (SCPs) can be applied to all accounts in the organization to prevent actions across all principals. By using the `iam:InstanceProfile` condition key with the `ec2:RunInstances` action, the SCP denies the launch of any EC2 instance that does not have the required IAM instance profile attached. This is a preventive control that blocks the action before it occurs, ensuring compliance across the entire multi-account environment.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create an SCP that denies ec2:RunInstances when the condition iam:InstanceProfile is not set to the required profile ARN.

    Why this is correct

    SCPs apply to all accounts in the organization and can deny actions based on conditions.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Attach an IAM policy to all users that denies ec2:RunInstances unless an instance profile is specified.

    Why it's wrong here

    This does not prevent launching instances via roles or services that bypass user policies.

  • Create an SCP that denies ec2:RunInstances when the condition ec2:InstanceProfile is not set.

    Why it's wrong here

    The correct condition key is iam:InstanceProfile, not ec2:InstanceProfile.

  • Use AWS Config rule ec2-instance-profile-attached to detect non-compliant instances and automatically terminate them.

    Why it's wrong here

    AWS Config is detective; automatic termination may cause disruptions and is not preventive.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is confusing the condition key `iam:InstanceProfile` (which is correct for IAM instance profiles) with `ec2:InstanceProfile` (which does not exist), leading candidates to choose Option C, and also mistaking detective controls like AWS Config for preventive controls, as in Option D.

Detailed technical explanation

How to think about this question

The `iam:InstanceProfile` condition key in an SCP evaluates the ARN of the IAM instance profile passed in the `ec2:RunInstances` API call. If no instance profile is specified, the condition key is not set, and the SCP can deny the action using the `Null` condition operator. In a multi-account environment, SCPs are the only mechanism that can enforce a blanket deny across all accounts, including the management account (if applied to the root OU), without requiring per-account IAM policy changes.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related SCS-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SCS-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SCS-C02 question test?

Infrastructure Security — This question tests Infrastructure Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create an SCP that denies ec2:RunInstances when the condition iam:InstanceProfile is not set to the required profile ARN. — Option A is correct because AWS Organizations Service Control Policies (SCPs) can be applied to all accounts in the organization to prevent actions across all principals. By using the `iam:InstanceProfile` condition key with the `ec2:RunInstances` action, the SCP denies the launch of any EC2 instance that does not have the required IAM instance profile attached. This is a preventive control that blocks the action before it occurs, ensuring compliance across the entire multi-account environment.

What should I do if I get this SCS-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More SCS-C02 practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This SCS-C02 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 SCS-C02 exam.