如何在API网关中设置Stage以使资源在不同阶段指向不同的Lambda [英] How to have set up Stage in API gateway to have resources pointing to different lambda in different stages

查看:77
本文介绍了如何在API网关中设置Stage以使资源在不同阶段指向不同的Lambda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道阶段"功能的确切功能是什么?在API网关控制台中.

I was wondering what is the exact functionality of the "Stage" in the API gateway console.

我想要实现的是. 使用相同的HTTP方法拥有相同的资源会在不同的阶段指向不同的lambda函数.

What I am trying to achieve is. To have the same resources with the same HTTP methods point to different lambda function in different stages.

我的开发URL指向我的开发lambda,我的生产URL指向生产lambda.

my development URL point to my development lambda and my production URL point to the production lambda.

有可能吗?

推荐答案

是的,可以通过

Yes it is possible through stage variables. The variables allow you to invoke different functions depending on the used stage. This is exemplified in:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆