https://github.com/mattyboy84/aws-serverless-multi-region-api
proof of concept for a global AWS API built using the Serverless Framework
https://github.com/mattyboy84/aws-serverless-multi-region-api
api appsync aws portfolio serverless
Last synced: 13 days ago
JSON representation
proof of concept for a global AWS API built using the Serverless Framework
- Host: GitHub
- URL: https://github.com/mattyboy84/aws-serverless-multi-region-api
- Owner: mattyboy84
- Created: 2024-03-28T19:50:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T19:55:39.000Z (over 2 years ago)
- Last Synced: 2025-02-25T20:32:27.886Z (over 1 year ago)
- Topics: api, appsync, aws, portfolio, serverless
- Language: JavaScript
- Homepage:
- Size: 199 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS-Serverless-Multi-Region-API
This is a proof of concept global AWS API using the Serverless framwork.
It includes a base `api` stack made up of a global dynamo table & it's replicas, A KMS key and many SSM parameters to pass relevant Ids & Arns to the `node` stacks.
The `node` stacks create a GraphQL API with a HTTP Proxy fronted by a Latency Route53 record with Cloudwatch metric or Lambda health checks for regional failover. The `node` stacks are designed to be region agnostic and can be deployed into any region that already has a global table replica in. The GraphQL API communicates with the replica in its own region to provide the lowest possible latency to access data across the globe.
The base `api` stack also includes a KMS key that's replicated in each `node` stack. The intention of this was to be used by the Lambda Authorizer for the region specific GraphQL API to authorize encrypted credentials stored in the global table as a 'global' authentication mechanism. This was preferable compared to AWS managed regional API keys (would fail if requests were routed to the region that the key wasn't created in) or cognito authorization which are inherently non-global
