API Reference
Overview¶
In this lab, you'll ask your agent to retrieve detailed API reference information for the AWS Lambda CreateFunction API. This demonstrates how the MCP Server provides your agent with precise, structured API documentation including parameter details, required permissions, and usage examples.
What You'll Learn¶
- How to request specific API reference documentation through your agent
- How to extract parameter requirements and constraints from API docs
- How the agent can help you understand IAM permissions needed for specific API calls
Instructions¶
Explore (Recommended)¶
Goal: Ask your agent to retrieve the complete API reference for the Lambda CreateFunction API, including required parameters, optional parameters, and the IAM permissions needed to call it.
Info
Hint 1: Ask specifically for the API reference — not general documentation. For example: "What are the required parameters for the Lambda CreateFunction API?" This directs the agent to look up reference documentation rather than tutorials.
Info
Hint 2: Follow up by asking about the IAM permissions required to call CreateFunction. The agent can cross-reference IAM documentation with the API reference.
Info
Hint 3: Try asking about error codes or limits: "What errors can Lambda CreateFunction return?" or "What are the size limits for a Lambda deployment package?"
Walkthrough¶
Click to see the step-by-step walkthrough
- Ask your agent to retrieve the Lambda CreateFunction API reference:
"Look up the API reference for AWS Lambda CreateFunction. What parameters are required?"
-
Review the response. You should see details about required parameters like
FunctionName,Role, andCode, along with their types and constraints. -
Ask about optional parameters:
"What optional parameters does Lambda CreateFunction accept? Focus on runtime configuration options."
- Ask about IAM permissions:
"What IAM permissions are needed to call Lambda CreateFunction? Include any permissions needed for the resources it references, like the execution role."
- Ask about constraints and limits:
"What are the limits for Lambda CreateFunction — maximum deployment package size, function name length, and timeout range?"
- Finally, ask the agent to synthesize this into something actionable:
"Based on the CreateFunction API reference, write me a minimal IAM policy that allows creating a Lambda function with an S3-based deployment package."
Validation¶
Your progress is tracked automatically via the CloudWatch dashboard. Successful API reference lookups through the MCP Server generate CloudTrail events that confirm Module 1 activity.
To verify manually: the agent's responses should contain specific numeric limits (e.g., 250 MB unzipped deployment size, 15-minute maximum timeout) that demonstrate real documentation retrieval rather than general knowledge.
Agent-Specific Tips¶
Claude Code excels at synthesizing API reference details into actionable code. After retrieving the API reference, try asking it to generate a boto3 call with all required parameters filled in based on what it found.
Kiro can retrieve API reference documentation and present it in a structured format. Try asking Kiro to compare the CreateFunction parameters with UpdateFunctionConfiguration to understand which settings can be changed after creation.
In Cursor's Agent mode, API reference lookups work best when you're specific about the service and operation name. If the response seems too general, rephrase with the full operation name: "Look up the Lambda CreateFunction API operation reference."
Codex can retrieve API references and use them to generate implementation code. After getting the reference details, ask it to scaffold a complete Lambda deployment script with proper error handling based on the documented error codes.