nerdexam
Amazon

AIP-C01 · Question #79

A company uses AWS Lambda functions to build an AI agent solution. A GenAI developer must set up a Model Context Protocol (MCP) server that accesses user information. The GenAI developer must also…

The correct answer is C. Use a Lambda function to host the MCP server. Create an Amazon API Gateway HTTP API that. Hosting the MCP server in a Lambda function and fronting it with Amazon API Gateway HTTP API is the correct architecture. API Gateway provides built-in authorization mechanisms - Lambda authorizers, IAM authentication, JWT/Cognito authorizers - so you can enforce that only…

Deployment, Operations, and Optimization

Question

A company uses AWS Lambda functions to build an AI agent solution. A GenAI developer must set up a Model Context Protocol (MCP) server that accesses user information. The GenAI developer must also configure the AI agent to use the new MCP server. The GenAI developer must ensure that only authorized users can access the MCP server. Which solution will meet these requirements?

Options

  • AUse a Lambda function to host the MCP server. Grant the AI agent Lambda functions permission
  • BUse a Lambda function to host the MCP server. Grant the AI agent Lambda functions permission
  • CUse a Lambda function to host the MCP server. Create an Amazon API Gateway HTTP API that
  • DUse a Lambda layer to host the MCP server. Add the Lambda layer to the AI agent Lambda

How the community answered

(25 responses)
  • A
    12% (3)
  • B
    4% (1)
  • C
    80% (20)
  • D
    4% (1)

Explanation

Hosting the MCP server in a Lambda function and fronting it with Amazon API Gateway HTTP API is the correct architecture. API Gateway provides built-in authorization mechanisms - Lambda authorizers, IAM authentication, JWT/Cognito authorizers - so you can enforce that only authenticated, authorized callers reach the MCP server. The AI agent Lambda functions call the MCP server through the API Gateway endpoint, and access control is enforced at the Gateway layer. Options A and B (based on the partial text) appear to rely on Lambda resource-based policies for inter-Lambda invocation, which do not easily restrict access to specific users or external callers. Option D (Lambda layer) is incorrect because Lambda layers are a packaging mechanism for shared code libraries, not a way to host a server; a layer added to the agent function cannot expose an independent MCP endpoint.

Topics

#Generative AI Agents#Serverless Architecture#API Security#AWS Lambda

Community Discussion

No community discussion yet for this question.

Full AIP-C01 Practice