Built while preparing for the AWS Certified Developer - Associate exam, this project exists to
exercise the API Gateway objectives against a real, working endpoint instead of just reading about
them: a single Lambda function fronted by two different API Gateway types, so their capabilities
could be compared side by side rather than taken on faith.
Challenge
API Gateway's HTTP API and REST API types look similar on paper, but the exam (and real projects) hinge on knowing exactly where they diverge: cost, feature set, and configuration surface. The only way to really internalize that was to stand up both in front of the same Lambda function.
One Lambda, Two Front Doors
A single Python Lambda function reads lat/lon from the query string, calls the free Open-Meteo API, and returns current conditions as JSON. Both the HTTP API and the REST API proxy straight into the same function, so any difference in behavior comes from the gateway, not the backend.
HTTP API: Lightweight and Open
The HTTP API (weather-demo-api) is the low-cost, low-ceremony option: CORS-enabled and open, no API key, ideal for a frontend that just needs to call an endpoint.
REST API: Keys, Quotas, and a Custom Domain
The REST API (weather-demo-rest-api) exercises the features HTTP APIs don't support: a required API key, a usage plan with request throttling and a daily quota, and a regional custom domain at weather-api.joesparkman.com backed by an ACM certificate.
DNS Outside AWS
joesparkman.com's DNS lives in GoDaddy, not Route 53, so the certificate validation record and the final domain-mapping CNAME couldn't be automated in CloudFormation. Those steps were done by hand in GoDaddy's DNS manager and documented in the README exactly as performed.
Staying in the Free Tier
Everything here runs comfortably within AWS free-tier limits: Lambda's million-request allowance, negligible per-request API Gateway pricing, and a free ACM certificate. The API key is stored in SSM Parameter Store rather than Secrets Manager specifically to keep ongoing cost at zero.