Giter Site home page Giter Site logo

aws-cdk-api-workshop's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.