mediumMultiple Choice
AIF-C01 Practice Question: A developer is building an agent using Amazon…
A developer is building an agent using Amazon Bedrock Agents. The agent needs to call an external API to retrieve weather data. What must the developer define to enable this capability?
⚠ Common exam trap
The AWS AI Practitioner exam often tests the distinction between action groups (for API calls) and knowledge bases (for document retrieval), leading candidates to mistakenly choose a knowledge base when the question involves external API integration.
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
✓
An action group with an OpenAPI schema and a Lambda function
To enable an Amazon Bedrock Agent to call an external API, the developer must define an action group that includes an OpenAPI schema describing the API's operations and a Lambda function to execute the API call and return results. The action group bridges the agent's intent recognition with the actual API invocation, making option B the correct choice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A Knowledge Base with weather documents
Why it's wrong here
A Knowledge Base performs retrieval over indexed documents using embeddings, returning passages rather than executing live API calls. Weather data requires an action group with an OpenAPI schema. A Knowledge Base is correct when the agent must answer from a static document corpus instead of a real-time external service.
- ✓
An action group with an OpenAPI schema and a Lambda function
Why this is correct
An action group with an OpenAPI schema and a Lambda function satisfies the requirement to call an external API. The OpenAPI schema defines the API operations the agent can invoke, while the Lambda function executes the actual weather data retrieval, letting Amazon Bedrock Agents orchestrate the call through defined action group parameters.
- ✗
A Bedrock Guardrail to filter the weather data
Why it's wrong here
Guardrails apply content filters and denied-topic policies to model inputs and outputs; they cannot invoke an external API. Defining an action group with an OpenAPI schema is what lets the agent call the weather endpoint. Guardrails would be the right choice when the requirement is to block harmful or off-topic responses.
- ✗
A prompt flow in Bedrock Studio
Why it's wrong here
Bedrock Studio prompt flows orchestrate prompts and model calls; they cannot invoke external APIs as agent tools. The developer must define an action group with an OpenAPI schema so the agent can call the weather API. Prompt flows are tempting because they build generative AI workflows, which suit prompt chaining rather than tool invocation.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
Courseiva writes every AIF-C01 question from scratch — 862 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.