Question 67 of 500

Quick Answer

The answer is to use a VPC endpoint for S3 combined with a bucket policy that restricts access to that specific endpoint. This is the most secure method because it enforces network-level isolation, ensuring that only traffic originating from within the VPC—and thus from the SageMaker notebook instance—can reach the designated S3 bucket. By layering a VPC endpoint policy with a resource-based bucket policy, you create a tightly scoped access control that prevents any access from the public internet, even if the IAM role is compromised. On the AWS Certified AI Practitioner AIF-C01 exam, this scenario tests your understanding of defense-in-depth for SageMaker, where a common trap is assuming an IAM policy alone is sufficient. Remember the memory tip: "Endpoint plus bucket policy equals no public trickery."

AIF-C01 Practice Question: Security, Compliance and Governance for AI Solutions

This AIF-C01 practice question tests your understanding of security, compliance and governance for ai solutions. 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.

A machine learning engineer wants to ensure that a SageMaker notebook instance only has access to a specific S3 bucket containing training data. The notebook instance is in a VPC. What is the most secure way to restrict access?

Question 1mediummultiple choice
Full question →

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

Use a VPC endpoint for S3 and a bucket policy that restricts access to the VPC endpoint.

Option A is correct because using a VPC endpoint for S3 combined with a bucket policy that restricts access to that specific endpoint ensures that only traffic originating from within the VPC (and thus from the SageMaker notebook instance) can reach the S3 bucket. This approach enforces network-level isolation and prevents access from any other source, including the public internet, even if the IAM role is compromised. It is the most secure method because it layers network policy (VPC endpoint) with resource-based policy (bucket policy) to create a tightly scoped access control.

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.

  • Use a VPC endpoint for S3 and a bucket policy that restricts access to the VPC endpoint.

    Why this is correct

    Combines network-level and resource-based policy to enforce access only from the VPC.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Place the notebook instance in a private subnet with a NAT gateway.

    Why it's wrong here

    NAT gateway does not restrict access to the bucket; it allows outbound internet.

  • Use AWS KMS to encrypt the bucket and grant the notebook role decrypt permissions.

    Why it's wrong here

    Encryption does not control access to the bucket.

  • Assign an IAM role to the notebook with an S3 bucket policy that only allows access to that bucket.

    Why it's wrong here

    This allows access from anywhere if the IAM credentials are used outside the VPC.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often think IAM roles and bucket policies alone are sufficient for security, but they overlook the need for network-level restrictions (like VPC endpoints) to prevent data exfiltration or unauthorized access from outside the VPC.

Detailed technical explanation

How to think about this question

A VPC endpoint for S3 uses AWS PrivateLink to route S3 traffic through the AWS network without traversing the public internet, and when combined with a bucket policy that includes a condition like `aws:SourceVpce` set to the endpoint ID, it ensures that only requests originating from that specific VPC endpoint are allowed. This mechanism effectively creates a 'network boundary' that prevents any other VPC, on-premises network, or internet-based client from accessing the bucket, even if they have valid IAM credentials. In practice, this is critical for compliance scenarios (e.g., HIPAA, PCI-DSS) where data must never leave a controlled network environment.

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 media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

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 AIF-C01 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 AIF-C01 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 AIF-C01 question test?

Security, Compliance and Governance for AI Solutions — This question tests Security, Compliance and Governance for AI Solutions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use a VPC endpoint for S3 and a bucket policy that restricts access to the VPC endpoint. — Option A is correct because using a VPC endpoint for S3 combined with a bucket policy that restricts access to that specific endpoint ensures that only traffic originating from within the VPC (and thus from the SageMaker notebook instance) can reach the S3 bucket. This approach enforces network-level isolation and prevents access from any other source, including the public internet, even if the IAM role is compromised. It is the most secure method because it layers network policy (VPC endpoint) with resource-based policy (bucket policy) to create a tightly scoped access control.

What should I do if I get this AIF-C01 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 AIF-C01 practice questions

Last reviewed: Jun 25, 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 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.