- A
Tag the approved VPC and use IAM policies to allow ECS actions only when the VPC tag matches.
Why wrong: Tag-based IAM policies are not sufficient to prevent task launches in other VPCs.
- B
Add an IAM policy to each ECS task role that denies the action if the VPC is not the approved one.
Why wrong: Task roles apply to tasks but don't prevent creation of tasks in other VPCs by administrators.
- C
Create an SCP that denies ecs:RunTask and ecs:CreateService unless the networkConfiguration.awsvpcConfiguration.subnets are in the approved VPC.
SCPs provide preventive controls at the organization level.
- D
Use AWS Config rules to detect tasks running in non-approved VPCs and trigger a remediation action.
Why wrong: Config is detective, not preventive.
Quick Answer
The correct answer is to create an SCP that denies ecs:RunTask and ecs:CreateService unless the networkConfiguration.awsvpcConfiguration.subnets belong to the approved VPC. This works because Service Control Policies (SCPs) act as a preventive control at the AWS Organizations level, setting a guardrail that overrides any permissive IAM roles or account-level configurations. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this scenario tests your understanding of how SCPs enforce organization-wide boundaries for resource usage, often appearing as a distractor against IAM policies or VPC endpoints. A common trap is to suggest using IAM conditions alone, but those can be bypassed by other accounts in the organization; SCPs cannot be overridden by account administrators. Memory tip: think of SCPs as the "bouncer at the door" for your entire org—they check the VPC ID on every task launch request before letting it through.
SAP-C02 Practice Question: Design Solutions for Organizational Complexity
This SAP-C02 practice question tests your understanding of design solutions for organizational complexity. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.
A financial services company is migrating its trading platform to AWS. The platform consists of hundreds of microservices deployed in containers using Amazon ECS with Fargate launch type. Each service has its own IAM role for fine-grained permissions. The security team requires that all ECS tasks use a specific VPC (vpc-12345) and cannot run in any other VPC. During a recent audit, it was discovered that some tasks are running in a different VPC (vpc-67890). The solutions architect must implement a preventive control to ensure that ECS tasks only run in the approved VPC. The company uses AWS Organizations and has Service Control Policies (SCPs) in place. What should the solutions architect do?
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 ecs:RunTask and ecs:CreateService unless the networkConfiguration.awsvpcConfiguration.subnets are in the approved VPC.
Option C is correct because Service Control Policies (SCPs) in AWS Organizations provide a preventive control that applies across all accounts in the organization. By denying ecs:RunTask and ecs:CreateService unless the subnets specified in networkConfiguration.awsvpcConfiguration belong to the approved VPC (vpc-12345), the SCP enforces the VPC constraint at the organization level, preventing any task from launching in a non-approved VPC regardless of individual IAM roles or account configurations.
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.
- ✗
Tag the approved VPC and use IAM policies to allow ECS actions only when the VPC tag matches.
Why it's wrong here
Tag-based IAM policies are not sufficient to prevent task launches in other VPCs.
- ✗
Add an IAM policy to each ECS task role that denies the action if the VPC is not the approved one.
Why it's wrong here
Task roles apply to tasks but don't prevent creation of tasks in other VPCs by administrators.
- ✓
Create an SCP that denies ecs:RunTask and ecs:CreateService unless the networkConfiguration.awsvpcConfiguration.subnets are in the approved VPC.
Why this is correct
SCPs provide preventive controls at the organization level.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Use AWS Config rules to detect tasks running in non-approved VPCs and trigger a remediation action.
Why it's wrong here
Config is detective, not preventive.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often confuse detective controls (AWS Config) with preventive controls (SCPs), or they mistakenly think IAM policies on task roles can control the launch VPC, when in fact the launch VPC is determined by the caller's permissions and SCPs, not the task's IAM role.
Detailed technical explanation
How to think about this question
SCPs are evaluated before IAM policies and can use conditions like 'aws:SourceVpc' or custom condition keys, but for ECS, the specific condition key is 'ecs:VpcId' (available in the request context for RunTask and CreateService). The SCP in option C uses the networkConfiguration.awsvpcConfiguration.subnets to infer the VPC, which is a valid approach because subnets are tied to a single VPC; however, a more precise condition would use 'ecs:VpcId' directly. Under the hood, the ECS service-linked role or the caller's IAM role must have permission to pass the task role (iam:PassRole), and the SCP denial overrides any allow in the account, making it a true preventive guardrail.
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.
- →
Design Solutions for Organizational Complexity — study guide chapter
Learn the concepts, then practise the questions
- →
Design Solutions for Organizational Complexity practice questions
Targeted practice on this topic area only
- →
All SAP-C02 questions
1,746 questions across all exam domains
- →
AWS Certified Solutions Architect Professional SAP-C02 study guide
Full concept coverage aligned to exam objectives
- →
SAP-C02 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related SAP-C02 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Design Solutions for Organizational Complexity practice questions
Practise SAP-C02 questions linked to Design Solutions for Organizational Complexity.
Design for New Solutions practice questions
Practise SAP-C02 questions linked to Design for New Solutions.
Continuous Improvement for Existing Solutions practice questions
Practise SAP-C02 questions linked to Continuous Improvement for Existing Solutions.
Accelerate Workload Migration and Modernization practice questions
Practise SAP-C02 questions linked to Accelerate Workload Migration and Modernization.
SAA-C03 VPC practice questions
Practise SAP-C02 questions linked to SAA-C03 VPC.
SAA-C03 S3 lifecycle policy questions
Practise SAP-C02 questions linked to SAA-C03 S3 lifecycle policy questions.
SAA-C03 RDS Multi-AZ questions
Practise SAP-C02 questions linked to SAA-C03 RDS Multi-AZ questions.
SAA-C03 IAM policy practice questions
Practise SAP-C02 questions linked to SAA-C03 IAM policy.
SAA-C03 Route 53 failover questions
Practise SAP-C02 questions linked to SAA-C03 Route 53 failover questions.
SAA-C03 CloudFront practice questions
Practise SAP-C02 questions linked to SAA-C03 CloudFront.
SAA-C03 NAT gateway questions
Practise SAP-C02 questions linked to SAA-C03 NAT gateway questions.
SAA-C03 VPC endpoint questions
Practise SAP-C02 questions linked to SAA-C03 VPC endpoint questions.
Practice this exam
Start a free SAP-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 SAP-C02 question test?
Design Solutions for Organizational Complexity — This question tests Design Solutions for Organizational Complexity — 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 ecs:RunTask and ecs:CreateService unless the networkConfiguration.awsvpcConfiguration.subnets are in the approved VPC. — Option C is correct because Service Control Policies (SCPs) in AWS Organizations provide a preventive control that applies across all accounts in the organization. By denying ecs:RunTask and ecs:CreateService unless the subnets specified in networkConfiguration.awsvpcConfiguration belong to the approved VPC (vpc-12345), the SCP enforces the VPC constraint at the organization level, preventing any task from launching in a non-approved VPC regardless of individual IAM roles or account configurations.
What should I do if I get this SAP-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 →
Same concept, more angles
3 more ways this is tested on SAP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which THREE components are required to set up a centralized logging solution for multiple AWS accounts using Amazon S3? (Choose THREE.)
hard- A.Amazon CloudWatch Logs subscription filter in each account.
- B.AWS CloudTrail in the central account only.
- ✓ C.A central S3 bucket in the logging account.
- ✓ D.A bucket policy on the central bucket that grants write access to the source accounts.
- ✓ E.IAM roles in each source account with permissions to write to the central bucket.
Why C: A central S3 bucket (option B), a bucket policy that allows cross-account writes (option C), and IAM roles in each account to push logs (option D) are required. Option A is wrong because it's one way but not required if using S3. Option E is wrong because CloudWatch Logs is not required.
Variation 2. A company uses AWS Organizations and wants to centrally manage VPC flow logs for all VPCs across all accounts. Which TWO steps are required to achieve this?
medium- A.Configure cross-account CloudWatch Logs subscription.
- ✓ B.Create a centralized S3 bucket in the logging account.
- C.Use VPC Flow Logs with Amazon Kinesis Data Firehose.
- ✓ D.Apply an SCP that requires VPC Flow Logs to be enabled.
- E.Use AWS Config rules to enable flow logs automatically.
Why B: Options A and D are correct. First, create a centralized S3 bucket to store flow logs. Then, use an SCP to enforce enabling flow logs on all VPCs. Option B is wrong because AWS Config can detect but not enforce. Option C is wrong because CloudWatch Logs cross-account subscription is not necessary if using S3. Option E is wrong because VPC Flow Logs can be delivered to S3 directly.
Variation 3. A company wants to implement a data perimeter to ensure that only authorized accounts can access their S3 buckets. Which TWO steps should they take?
medium- ✓ A.Use SCPs to deny access from external accounts.
- B.Use VPC endpoints with bucket policies.
- ✓ C.Use S3 bucket policy with aws:SourceAccount condition.
- D.Enable CloudTrail to log access.
- E.Use AWS Network Firewall.
Why A: Option B is correct because bucket policy with aws:SourceAccount condition ensures only specific accounts. Option D is correct because SCPs can deny access from outside the organization. Option A is wrong because it's for CloudTrail. Option C is wrong because it's for VPC endpoints. Option E is wrong because it's for network perimeter, not account-level.
Last reviewed: Jun 11, 2026
This SAP-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 SAP-C02 exam.
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.
Sign in to join the discussion.