John D. · Secure AI API
DEVSECOPS · GENERATIVE AI · AWS

Secure AI API Deployment

Production-style reference architecture for exposing Amazon Bedrock through a controlled API boundary with a Secrets Manager-backed Lambda authorizer, least-privilege IAM, validation, throttling, and CloudWatch observability.

API GatewayLambdaBedrockSecrets ManagerIAMCloudWatchTerraform
PROJECT STATUSImplemented
CI VALIDATIONLoading…
DEPLOYMENTManual by Design
AUTH MODELSecret-backed Authorizer
REQUEST TRUST PATH

Authenticate → Validate → Invoke → Observe

CLIENTHTTPS Request

Health route is public; AI inference requires a bearer token.

EDGEAPI Gateway

Explicit routes, throttling, CORS, and access logging.

AUTHLambda Authorizer

Reads the API token from Secrets Manager and validates it.

AILambda + Bedrock

Prompt validation and least-privilege model invocation.

OBSERVECloudWatch

API and Lambda operational logging with retention.

Secure AI API on AWS data flow diagram showing users, Route 53, CloudFront, WAF, Cognito, API Gateway, Lambda, Amazon Bedrock, S3, DynamoDB, Secrets Manager, CloudWatch, KMS, and the safe response path
Secure AI API on AWS architecture diagram grouped into Edge and Protection, Identity and API, Application Layer, Generative AI Services, Data and Secrets, Security and Observability, and Delivery and Operations domains

Implemented controls

Secrets ManagerToken value stays out of source and Terraform state.
Least PrivilegeSeparate IAM permissions for auth and inference.
Request ValidationJSON and prompt-length checks occur before AI calls.
ThrottlingAPI Gateway rate controls reduce abuse risk.
Safe LoggingAccess logs exclude tokens and request bodies.
CI SecurityUnit tests, Bandit, and Terraform validation.
Reference implementation only; the dashboard does not claim the Terraform stack is currently deployed in production.

Recent validation runs

RunResult
Loading…
Reading public GitHub Actions metadata.
MICROSOFT AZURE REFERENCE ARCHITECTURE
Microsoft Azure reference architecture diagram for secure ai api deployment

Azure reference equivalent for portfolio comparison. The original project implementation remains as documented elsewhere on this page.