https://github.com/danielcristho/cdk-go-simple-restapi
Golang CDK For Deploying Lambda Function
https://github.com/danielcristho/cdk-go-simple-restapi
aws-lambda cdk golang serverless
Last synced: 2 months ago
JSON representation
Golang CDK For Deploying Lambda Function
- Host: GitHub
- URL: https://github.com/danielcristho/cdk-go-simple-restapi
- Owner: danielcristho
- Created: 2024-03-27T20:06:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-04T21:03:44.000Z (about 1 year ago)
- Last Synced: 2025-01-30T02:28:29.234Z (4 months ago)
- Topics: aws-lambda, cdk, golang, serverless
- Language: Go
- Homepage:
- Size: 5.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Go REST API
Deploy GO function to [Lambda](https://aws.amazon.com/lambda/) using [CDK](https://aws.amazon.com/cdk/).
## Installation
```bash
git clone https://github.com/danielcristho/cdk-simple-go-restapi.git
``````bash
make install
```Or
```bash
make setup
```## Build
```bash
make build
```After the deployment is successful, testing the API:
```bash
curl https:///prod/hello-world
```Response:
```json
{"Greeting":"Hello From API!"}
```## CDK
The `cdk.json` file tells the CDK toolkit how to execute your app.
## Useful commands
* `cdk deploy` deploy this stack to your default AWS account/region
* `cdk diff` compare deployed stack with current state
* `cdk synth` emits the synthesized CloudFormation template
* `cdk destroy` destroy the stack
* `go test` run unit tests