I have a pretty complex backend project that I deploy to AWS using the Serverless framework. The problem I’m facing is related to versioning. I have a React app on the FE, which has a version on it, but I didn’t add a version to the BE for simplicity (it is the same app, I’m not exposing any special API so didn’t want to deal with versioning matrices between the FE and the BE, backward compatibility, etc…) → Is this a mistake?
When I deploy my BE code, AWS does keeps track of the deploy calls and adds versions in the Versions tab of the Lambdas page (automatically incrementing the version upon each deploy), and it has a Description property. I’d like to access that Description to at least have an idea which code is running at any given time.
I was looking at the serverless docs and couldn’t find a way to send a Description up to AWS. I’m calling it like so:
serverless deploy -s integration
Any thoughts and/or ideas on versioning serverless backend are appreciated.
Not sure there is a way to write the description because it’s part of the gateway definition behind the scenes. I noticed on mine that I have a mix of REST calls and Websocket calls and the screen you show on mine actually says “Serverless Websocket” for description, but REST is blank.
Digging through the .serverless folder build with the sls package command, I found the JSON where the description is specified:
"Description": "Serverless Websockets",
So presumably the same entry could be made in a rest entry per the docs at AWS::ApiGateway::RestApi - AWS CloudFormation
Here, except I can’t see any way to specify your own setup for this chunk of cloudformation since it’s a “behind the scenes” thing with the serverless framework. But that is where it would go.
Also found Serverless Framework: Plugins check under the Manual Merge section
Thank you! Appreciate the input. I’ll look into these and see if I can use them.