Back to Home
vijayyarabolu icon

Secure_GenAI_Gateway_and_MCP_Server

Verified Safe

by vijayyarabolu

Overview

A secure serverless gateway for accessing Large Language Models (LLMs) via Amazon Bedrock, incorporating input sanitization and routing.

Installation

Run Command
sam build && sam deploy --guided

Security Notes

The `sanitize_input` function provides only basic blocking of hardcoded words (`password`, `secret_key`, `ssn`) and explicitly notes it's not as sophisticated as dedicated libraries (e.g., Microsoft Presidio). The README mentions a 'Prompt Firewall' to prevent jailbreaks, but the provided `lambda_function.py` does not contain explicit logic for system prompt enforcement or advanced prompt injection prevention beyond the basic word list. This is a gap between the described features and the implemented code. There are no hardcoded secrets or `eval` statements. The serverless architecture and IAM policies for Bedrock invocation (`bedrock:InvokeModel`) are good security practices.

Similar Servers

Stats

Interest Score38
Security Score7
Cost ClassMedium
Avg Tokens1000
Stars1
Forks0
Last Update2025-11-27

Tags

AWSServerlessGenAIBedrockSecurityLLM Gateway