Having primarily worked in the serverless space on many large scale enterprise cloud projects since the inception of lambda, it got me thinking:
“What are the hints, tips and lessons learned I could pass onto other software engineers, teams and architects?”
Below is a list of the common pitfalls, lessons learned, things to consider, and useful nuggets of information based on architecting and managing developers over various large scale projects over recent years, which I hope technical leads, lead software developers and architects may find useful.
In the Serverless World, there are always situations when developing solutions that two or more APIs need to communicate with each other synchronously.
The gold standard would be totally decoupled domain services using events, but in reality, there are often reasons why you need a machine to machine style communication using REST.
This blog post covers using the OAuth2 Client Credentials Grant flow to authenticate APIs (machines) rather than users, using AWS Cognito, API Gateway, AWS Lambda, and TypeScript, hosted in a Lerna monorepo for ease of the demo. You can view the code repo here.
We will be building…
When working with AWS Lambda there are various storage options available when working with files, but in which scenario should you use each one?
This blog post covers three options, with code examples; and discussions around when to use each, the advantages and disadvantages, and relative speed:
✔️ AWS S3
✔️ AWS EFS
✔️ Lambda Ephemeral Storage (tmp)
There is a forth option of Lambda Layers which I won’t be covering here as the files are always static in this scenario, but is covered in the following blog post below:
We are going to walk through building a solution which…
This blog post goes through an introduction of AWS Lambda Layers, and then builds out a serverless screenshot application using the Serverless Framework, TypeScript and Puppeteer. You can access the code repo example here. I found that most developers using Serverless forget about this feature, and it is very useful to have this in your mental toolkit when building out applications🛠
Since AWS brought out AppSync it has been a game changer in the Serverless World, allowing teams to use a managed GraphQL service, for both web applications and mobile. If you couple this with the Serverless Framework and the serverless-appsync plugin, you have a very powerful way to quickly build serverless production ready GraphQL APIs. 💥
One of the downsides however is the use of VTL (Velocity Template Language) templates, i.e. the ‘glue code’ between the graphQL resolver and the underlying service (DynamoDB, Lambda, HTTP etc), is that they are not very flexible when it comes to localisation, reusing regexes…
This article will cover a feature of AWS Lambda that has been around since winter 2019 but a lot of developers and architects are not aware of it, or don’t typically utilise in my experience — Lambda destinations. It may be worth just knowing this feature is available and having it at the back of your mind when architecting new solutions. 🛠
I have added the following basic code repo showing a small example application here.
Lambda destinations allow you to automatically route success or failure scenarios from your async lambda invocations to four AWS service destinations automatically without the…