4

I'm deploying a .NET Core Web API project into Amazon Lambda using this tutorial:
Creating .NET Core AWS Lambda Projects without Visual Studio

I have successfully executed the command stack and got the sample Web API app running in Lambda behind an API Gateway:

  1. dotnet new lambda.AspNetCoreWebAPI
  2. dotnet restore
  3. dotnet build
  4. dotnet lambda deploy-serverless -sn stackname -sb bucketname --profile-location ./credentials

So far so good, and I can get to the app via the execute-api.eu-west-2.amazonaws.com address and it works.

However, I want to take advantage of the lambda features around versioning so that every time I deploy, it creates a new deployment and allows me to have the API Gateway stages pointing at differing versions of the lambda.

However there is only one version, $latest, which always points to the last deployment.

How can I make it have an incrementing version number with the deployments instead of it always just overwriting the $latest?

bgs264
  • 4,572
  • 6
  • 38
  • 72
  • Is it this what you are looking for? https://stackoverflow.com/questions/41452274/how-to-create-a-new-version-of-a-lambda-function-using-cloudformation – Can Sahin Nov 29 '17 at 12:21

0 Answers0