Deploy GO function to Lambda using CDK.
git clone https://github.com/danielcristho/cdk-simple-go-restapi.git
make install
Or
make setup
make build
After the deployment is successful, testing the API:
curl https://<api_gateway_url>/prod/hello-world
Response:
{"Greeting":"Hello From API!"}
The cdk.json
file tells the CDK toolkit how to execute your app.
cdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation templatecdk destroy
destroy the stackgo test
run unit tests