https://github.com/patrickpang/mangonel
Throw your TypeScript function onto AWS Lambda
https://github.com/patrickpang/mangonel
Last synced: 5 months ago
JSON representation
Throw your TypeScript function onto AWS Lambda
- Host: GitHub
- URL: https://github.com/patrickpang/mangonel
- Owner: patrickpang
- License: unlicense
- Created: 2021-08-18T13:04:00.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-18T14:26:46.000Z (almost 5 years ago)
- Last Synced: 2025-05-19T23:43:41.197Z (about 1 year ago)
- Language: HCL
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mangonel
Starter template for AWS Lambda using Node.js, TypeScript, Terraform
> When you surround an army, leave an outlet free. — Sun Tzu

## Setup
Install the following tools before getting started:
- [ ] [Node.js](https://nodejs.org/en/)
- [ ] [pnpm](https://pnpm.io/)
- [ ] [aws-cli](https://aws.amazon.com/cli/)
- [ ] [Terraform](https://www.terraform.io/)
## Initialize
You only have to do this once after cloning.
Initialize AWS credentials:
```shell
$ aws configure
```
Initialize Node.js workspace:
```shell
$ cd hello-world-lambda
$ pnpm install
```
Initialize Terraform workspace:
```shell
$ cd infra
$ terraform init
```
## Deploy
Use the shell script to create the lambda package and deploy to AWS:
```shell
$ ./deploy.sh
```
## Test
Invoke the lambda from AWS Management Console.
You can use the below example payload:
```json
{
"name": "Patrick"
}
```