AWS SAM — API Gateway Demo

Static site served from S3, with one GET and one POST API routed through API Gateway.

AWS SAM S3 API Gateway Lambda Node.js 20.x

GET /api/hello

Returns a JSON greeting. Pass an optional name query parameter.


  

POST /api/greet

Accepts a JSON body { "name": "...", "message": "..." } and returns a personalised response.


  
Architecture: This page is served from S3 (private) via CloudFront (HTTPS, OAC). API calls cross to a separate API Gateway (HTTP API) subdomain via CORS. GET /api/hello → GetApiFunction  |  POST /api/greet → PostApiFunction. Deployed with AWS SAM.