Better way to get secrets in serverless world. It might be helpfully in case You are involved in some way or other in serverless world. Most likely if you are actively using serverless technologies, You already implemented such kind of helper to retrieve some secret data.
Most likely if you are actively using serverless technologies, You already implemented such kind of helper to retrieve some secret data from secret Manager at runtime. I thought there could be some pitfalls and area for improvement.
In this example, we will implement a helper to get secret values from AWS Secret Manager
You’re welcome on board to disassemble such kind of helper! We will use typescript. Based on the technique used here, it will be possible to use any programming language (well, almost).
Let’s define the initial “look” of our helper
On Amazon Web Services the Serverless computational service par excellence remains Lambda, a must-have service when talking about this paradigm.
Serverless Node TypeScript is a starter kit to write serverless applications by using the Serverless Framework in Node.js and TypeScript. An Apollo GraphQL server and a REST endpoint come configured out of the box
NodeJS + TypeScript, How to Set Up