LAMBDA deployment to different env based on version



We are have dev and stage api gateway url in same aws account, would like to deploy to different version of lambda in these two environment.

dev https://********

Stage https://*********

Can you say how to achieve this in aws codepipeline (cloudformation). Let me know if you required more info.

1 Answer


given you have both API and lambda in same account you could use Lambda aliases (

You can :

  • create two aliases for your lambda, DevAlias and StageAlias
  • Associate same or different Lambda version to them
  • Associate the lambda aliases as lambda integrations with the API Gateway.

I would look into Code Deploy abilities to perform Canary deployment for Lambda aliases. Some references:

Hope it helps

profile picture
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions