Reputation: 59345
What happens when you deploy a stage in the AWS API Gateway and then update your Lambda? Is the Lambda versioned?
Let's say I have a lambda charlie
and I upload it (version 1) then deploy a API Gateway stage, dev
. Then I make an update to charlie
(version 2) and deploy another stage (prod
)?
dev
and stage prod
running the same Lambda?dev
running version 1
of charlie & prod
running version 2
?Upvotes: 5
Views: 1231
Reputation: 13632
What happens when you deploy a stage in the AWS API Gateway and then update your Lambda? Is the Lambda versioned?
Lambdas are versioned if you follow AWS Lambda Versioning and you publish a version by either a) publishing a version explicitly, or b) publishing a version at the time you create or update a Lambda function
If you are using API Gateway stage variables, then you can call different Lambda versions using stage variables and Lambda version aliases.
Are stage dev and stage prod running the same Lambda?
Yes. Unless you publish and manage Lambda versions.
Or is dev running version 1 of charlie & prod running version 2?
No. As mentioned above, you need to use stage variables and aliases.
Upvotes: 8