Skip to content

Ayushlm10/awsCdkGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy resources on aws using CDK(and go)!

A basic setup for deploying lambda , apigateway and a dynamodb database using amazon cdk in golang.

This is what we deploy:

Cloudformation stack:

image

A simple user dynamodb table:

image

API gateway with the following API routes:

image

.. and a few lambda functions (check out lambda/api.go).

image

Setup:

  • AWS account (a free account will work)
  • Setup aws cli and cdk.
  • cd into the lambda directory.
  • make build
  • cd back to root of the project.
  • cdk diff to check what is being deployed.
  • cdk deploy

A lambda function to register and login users will be deployed. This lambda function sits behind amazon api gateway and stores data in a dynamodb database.

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
  • go test run unit tests
  • cdk destroy to delete the stack.

About

My experiments with deploying code on aws using golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors