Skip to content

Grenguar/aws-cdk-api-workshop

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 

aws-cdk-api-workshop

This is the guide for creating your first CDK app with AWS Lambda behind the API Gateway. The API connected to Dynamo DB table for storing and retrieving books. The Lambdas have granular permissions for the table.

There is an article about this project on dev.to. If you enjoy it, like it and share. This will help others to know more about CDK.

Book Exampe:

{
    "title": "Simulacra and Simulation",
    "author": "Jean Baudrillard",
    "yearPublished": "0-472-06521-1",
    "isbn": "0-676-97376-0"
}

Steps

Environment Configuration

  • First, get your AWS user credentials.

Setup Environment

  • Install AWS CLI (mac OS - brew install awscli; linux, win)
  • When AWS CLI installed:
    aws configure
  • Install NodeJS tools (any OS)
  • npm install -g aws-cdk
  • in the root - npm i && npm run build - one will get the code folder needed for infra
  • after that cd infra && npm i && npx cdk deploy

Structure

  • <root>/infra has the CDK app for deploying the stack
  • <root>/src/functions has needed handlers for lambdas

Important Note!

Do not forget to remove the stack.

cdk destroy

This is a good habit to be sure that resources are deleted. It will help to avoid unexpected AWS costs. Check also that CloudFormation stack was deleted in the console.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published