Why? Mostly for fun. I don't see too many practical use cases for such setup. Lambda@Edges aren't suitable for a lot of cases due to limited memory and CPU, so they are slow. If you need a globally available website with dynamic content, you should consider going with JAMStack served via CloudFront, Vercel or Cloudflare.
- Globally and highly available
- GraphQL Server at each of Edge locations using Lambda@Edge + CloudFront
- Globally replicated DynamoDB Tables
- GraphQL handlers routing to the closest DynamoDB table as persistence layer
- Pay-what-you-use model, no upfront or fixed charges, everything billed per-request
- Infra managed using AWS-CDK and Typescript
- Node functions packaged and minified automatically using Parcel, (there's a small bug though)
npm run build
compile typescript to jsnpm run deploy
deploy this stack to your default AWS account/region
- Your server must be rather lightweight. Minified GraphQL Server code must be less than
1 MB
. Lambda@Edge is restricted to128MB
of memory and5000ms
of timeout forVIEWER_REQUEST
integration type. - Cannot use ENV variables
- Table name is hardcoded, gonna fix that
- Schema creation is laborious right now
Looking for cool DynamoDB editor? Check out Dynobase