https://github.com/pauliescanlon/edge-locations-serverless-api
Serverless Framework AWS Multi-Region Lambda
https://github.com/pauliescanlon/edge-locations-serverless-api
aws aws-lambda lambda serverless serverless-framework
Last synced: about 1 year ago
JSON representation
Serverless Framework AWS Multi-Region Lambda
- Host: GitHub
- URL: https://github.com/pauliescanlon/edge-locations-serverless-api
- Owner: PaulieScanlon
- Created: 2023-03-04T19:37:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T08:15:19.000Z (about 3 years ago)
- Last Synced: 2025-01-26T10:09:22.582Z (about 1 year ago)
- Topics: aws, aws-lambda, lambda, serverless, serverless-framework
- Language: JavaScript
- Homepage: https://cockroachdb-edge-locations.vercel.app/
- Size: 74.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless Framework AWS Multi-Region Lambda
## Usage
This repo is for multi-region AWS Lambda Functions used in the [Edge](https://cockroachdb-edge-locations.vercel.app/) app.
- 🚀 API [https://api.crl-devrel.net/](https://api.crl-devrel.net/)
- 🚀 APP [https://cockroachdb-edge-locations.vercel.app/](https://cockroachdb-edge-locations.vercel.app/)
### Deployment (Prod)
Deployment for three regions is handled when a push or merge occurs on the `main` branch. This is handled by the a GitHub Action: `./.github/workflows/build-me.yaml`
### Deployment (Dev)
Deploy all three regions in one hit
```
npm run deploy
```
#### Deployment (Local | serverless)
The default region is `us-east-1`. Using the below deploys to the default region.
```shell
serverless deploy
```
#### Deployment (Local | serverless - regions)
To deploy to additional regions use the below.
```shell
serverless deploy --region eu-central-1
serverless deploy --region us-west-1
```
## Infrastructure
Each Lambda is deployed to a region. The region also requires a custom domain and ACM certificate mapping. Each API can then be used by Route 53 which routes traffic by geographical A records in Hosted Zones.
## Tech
- [Serverless Framework](https://www.serverless.com/framework/docs)
- [Serverless CLI](https://www.serverless.com/framework/docs/getting-started).