cdktf / cdktf-integration-serverless-example

End to end example for deploying a serverless application via CDK for Terraform
Mozilla Public License 2.0
29 stars 8 forks source link
aws aws-lambda cdk cdk-examples cdktf example serverless terraform-cdk

CDK for Terraform Serverless application example

This repo contains an end to end example in TypeScript for a serverless web application hosted on AWS and deployed with the CDK for Terraform. Please refer to the guide for more information.

Techstack

Frontend: React, Create React App, statically hosted via AWS S3 + CloudFront
API: AWS Lambda + API Gateway + DynamoDB

Application

The example application features a list of posts and a modal to create a new post by specifying author and content.

list of posts create a new post

Documentation

This application serves as the sample for the "Building a serverless application with the CDK for Terraform" guide which can be found here.

Future Features

There are some features we'd like to add to this application over time to cover more common use cases and scenarios that might appear when building applications. As building within the serverless paradigm often makes use of cloud native services, we plan to extend this example to showcase such features and also to cover different cloud providers at some point.
Besides new features, we also plan to keep this example up-to-date with newer versions of the CDKTF to get rid of workarounds for workflows that get supported by later versions of the CDKTF (e.g. referencing resource outputs in other stacks).

Ideas

(in no particular order)

Workarounds (required currently)

Todos (short term)

Other notes (soon to be converted into issues for CDKTF)