Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 765 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 765 Bytes

todo-aws

A Next.js to do list web app with FastAPI, AWS CDK, DynamoDB, Lambda Function

Screenshot

Self note for future reference

Getting started

Init CDK

cdk init --language typescript

Shell command to activate .sh to zip

chmod -x pkg_for_lambda.sh

./pkg_for_lambda.sh

Deploy CDK

cdk deploy

Infra/lib/infra-stack.ts

    // Lambda function for the API
    const api = new lambda.Function(this, "API", {
      runtime: lambda.Runtime.PYTHON_3_9,
      code: lambda.Code.fromAsset("../api/lambda_function.zip"),
      handler: "todo.handler",
      environment: {
        TABLE_NAME: table.tableName,
      },
    });