Description
Problem
Existing serverless framework is being deprecated in favour of the new serverless components architecture. Because of this, Internote's ops needs to update to use components, or use an alternative deployment mechanism. There are two choices and this issue is to keep track of progress in delivering a final solution that is scalable.
Serverless components
Serverless components is the next iteration of serverless. It's slightly different from the existing set up in the sense that it does not use CloudFormation.
- Serverless next.js: https://github.com/danielcondemarin/serverless-next.js/tree/master/packages/serverless-nextjs-component
- Supporting stages: https://github.com/serverless/components/issues/481
- Supporting monorepos: Layers in a monorepo project serverless-components/aws-lambda#8
AWS CDK
AWS CDK is a fairly new platform for declaring infrastructure as code using programming languages such as TypeScript. It is not limited to solely Lambda services and can be used to provision and architect any AWS service.
- Official docs: https://docs.aws.amazon.com/cdk/api/latest/docs
- Example CRUD lambda /w dynamodb: https://github.com/aws-samples/aws-cdk-examples/blob/master/typescript/api-cors-lambda-crud-dynamodb/index.ts
- Connecting resources from different CDK stacks: https://docs.aws.amazon.com/cdk/latest/guide/resources.html
Current thinking
At the moment, my current thinking is that AWS CDK might be the most robust and scalable solution to provision and maintain infrastructure. It's AWS backed and has a lot of traction / momentum on GitHub in addition to lots of examples and decent documentation.