https://github.com/garysassano/cdktf-aws-sveltekit-hono-lambdaliths
CDKTF app that deploys SvelteKit and Hono Lambdaliths along with an Upstash Redis database to AWS
https://github.com/garysassano/cdktf-aws-sveltekit-hono-lambdaliths
aws-lambda aws-lambda-web-adapter cdk-for-terraform cdktf cdktf-ts hono lambda-web-adapter lambdalith serverless sveltekit terraform-cdk typescript upstash
Last synced: 2 months ago
JSON representation
CDKTF app that deploys SvelteKit and Hono Lambdaliths along with an Upstash Redis database to AWS
- Host: GitHub
- URL: https://github.com/garysassano/cdktf-aws-sveltekit-hono-lambdaliths
- Owner: garysassano
- License: apache-2.0
- Created: 2024-01-22T22:34:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-26T18:16:58.000Z (4 months ago)
- Last Synced: 2025-01-26T19:26:34.116Z (4 months ago)
- Topics: aws-lambda, aws-lambda-web-adapter, cdk-for-terraform, cdktf, cdktf-ts, hono, lambda-web-adapter, lambdalith, serverless, sveltekit, terraform-cdk, typescript, upstash
- Language: TypeScript
- Homepage:
- Size: 166 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cdktf-aws-sveltekit-hono-lambdaliths
CDKTF app that deploys SvelteKit and Hono Lambdaliths along with an Upstash Redis database to AWS.
This app leverages the [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) with Lambda Function URLs.
## Prerequisites
- **_AWS:_**
- Must have authenticated with [Default Credentials](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration) in your local environment.
- **_Upstash:_**
- Must have set the `UPSTASH_EMAIL` and `UPSTASH_API_KEY` variables in your local environment.
- **_Terraform:_**
- Must be [installed](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform) in your system.
- **_Node.js + npm:_**
- Must be [installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) in your system.
- **_Docker:_**
- Must be [installed](https://docs.docker.com/get-docker/) in your system and running at deployment.## Installation
```sh
npx projen install
```## Deployment
```sh
npx projen deploy
```## Cleanup
```sh
npx projen destroy
```## Application Details
- `back-lambda`
- Environment variables:
- `REDIS_URL` - Address of the Redis database in the form of `rediss://:@:`
- Port bindings:
- `3000`
- Endpoints:
- `/` - Hello message display
- `/ping` - Returns static "pong" response (used for readyness check)
- `/api/clicks` - Returns current click count
- `/api/clicks/incr` - Increments click count by 1 and returns new click count
- `front-lambda`
- Environment variables:
- `BACKEND_URL` - Address of the backend service reachable from the server side in the form of `https://`
- Port bindings:
- `3000`
- Endpoints:
- `/` - Click counter display
- `/ping` - Returns static "pong" response (used for readyness check)## Architecture Diagram
