How to track versions of deployed apps?

aws

#1

I’m building my first Serverless app on AWS Lambda. I haven’t touched it in a few weeks, and just finished with some local development.

Now I want to deploy it to Lambda, but I realized I have no idea what changes I would actually be deploying since I can’t recall if I ran a deploy at the end of my last development session a few weeks ago. This is a pretty scary situation to be in. In other words, I don’t know if I’d be deploying just today’s commit, or code from several weeks ago as well.

I’m migrating from Heroku, and I feel like Heroku handled this pretty well by associating every deployment with a particular Git commit. I’d love the same for Serverless on Lambda, so I can see for instance that my development Lambda environment is running commit abc1234 from a few weeks ago (obviously I’m using Git locally for version control).

How do folks generally handle this? Note that I’m using the Serverless Stage Manager with development / staging / production environments if that makes a difference.


#2

I couldn’t find any good automated solutions for this, so I created one!

This plugin is super simple: all it does is to create a local git tag after you run a deploy, using the version of the deployed function as the tag name. That way, you’ll always be able to correlate the versions of your local source code and deployed artifacts.