Courseiva
Applications of Foundation ModelseasyMultiple SelectObjective-mapped

AIF-C01 Applications of Foundation Models Practice Question

A company is using Amazon Bedrock to generate code snippets. They want to ensure the generated code is secure. Which TWO practices should they implement?

⚠ Common exam trap

The AIF-C01 exam often tests the misconception that model parameters like temperature or token limits can substitute for explicit security controls, when in fact only guardrails and human review directly address code security.

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 guardrails to block insecure code patterns.

Amazon Bedrock Guardrails allow you to define policies that filter or block generated content containing insecure code patterns, such as SQL injection or hardcoded credentials, before the output is returned. This provides a proactive security layer that prevents insecure code from reaching the user, directly addressing the requirement to ensure generated code is secure.

Answer analysis

Option-by-option breakdown

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

  • Increase the max token limit to generate longer code.

    Why it's wrong here

    Longer code does not improve security.

  • Use guardrails to block insecure code patterns.

    Why this is correct

    Guardrails can filter out harmful content.

  • Set the temperature to 0 for deterministic output.

    Why it's wrong here

    Deterministic output does not ensure security.

  • Review and test all generated code before deployment.

    Why this is correct

    Manual review catches security issues.

  • Use a larger model for better accuracy.

    Why it's wrong here

    Larger models do not guarantee security.

About these practice questions

One of 619 original AIF-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.