![npm serverless-offline npm serverless-offline](https://nahuelhernandez.com/img/2021/01/serverless-cicd-on-aws-3.png)
Let’s see how we can build a pleasant SAM-TypeScript experience ourselves: from local development to deployment.
![npm serverless-offline npm serverless-offline](https://www.proud2becloud.com/wp-content/uploads/2020/08/infrastructure_schema_serverless_backend_typescript.png)
It is a major drawback, but not a reason to give up and throw your types and compile-time checking out of the window.
![npm serverless-offline npm serverless-offline](https://dashbird.io/wp-content/uploads/2018/07/project-setup.png)
There is just one problem: AWS SAM does not support TypeScript out of the box. Luckily, it’s 2021, and we can rely on TypeScript to bring the joy back into writing JS. However, writing pure JavaScript is arguably less pleasant than running pure JavaScript. SAM makes it easy to deploy your Lambdas along with all the required cloud infrastructure (API gateways, databases, queues, logging, etc.) with the help of widely used AWS CloudFormation templates.Įven though AWS Lambda supports many runtimes, Node.js remains my number one choice for the richness of its npm ecosystem, the abundance of online documentation and examples, and stellar startup times. There are many tools to simplify the development of serverless functions: cross-vendor Serverless framework, AWS-specific Serverless Application Model (SAM), and others.ĪWS SAM is a great choice if you already rely on the Amazon Web Services ecosystem. Recently, we had a perfect use case for Lambdas on our project with 2U, Inc., a global leader in education technology, as tasks like supporting student admissions or processing exam results are highly seasonal and can be easily handled in a serverless environment. Read about other cool things we have done for 2U in our dedicated post: “Apollo launch: Building a migration architecture for 2U”