Recently, I came across a small project. The requirements were perfect for a serverless implementation described in AWS Lambda functions and invoking it using AWS API Gateway.
I started drawing the flow and realized that, after going live, I won’t be able to make incremental changes to the same function directly as it may impact the production.
That means I would need at least one more environment apart from production to be able to test the changes safely before going live.
The quickest option was to create a new lambda function and copy the same code and then make the changes. This would have worked but then I had to create a separate API in API Gateway to integrate with this new lambda function. It also increases maintenance efforts and costs.
After a bit of research, I found a better way :)
As a first step, you need to create just one function in AWS Lambda.
Choose the required runtime and deploy the code.
Test the function to make its working.
I’m assuming you already know how to do that and skipping the detailed steps :)
Go to the AWS Lambda function in AWS,
#serverless #aws-lambda #versioning #aws-api-gateway