A simple plugin that, when deploying your API, updates SSM Parameter Store with the current git tag + commit. The aim is to provide an automatic history log of API deployments and their versions, tracking back to version control.
The API git versions are updated into SSM using a specific key prefix, which by default is '/api-gateway//versions/'. If you want to supply a custom prefix, you can do so by putting the following configuration in your serverless config file:
custom:
ssmApiGitVersion:
ssmPrefix: '/my-custom/<stage>/prefix/'
The <stage>
placeholder gets replaced with the stack stage.
Simply include the plugin in your serverless project:
plugins:
- serverless-ssm-api-git-version
On sls deploy
, SSM is updated automatically.