Yes it is possible through stage variables. The variables allow you to invoke different functions depending on the used stage. This is exemplified in:
What's more, you could invoke same function, but with different parameters that depend on the stage:
For example, you might want to reuse the same Lambda function for multiple stages in your API, but the function should read data from a different Amazon DynamoDB table depending on which stage is being called.
Technically, a stage is a snapshot of the API. It is something similar to versions of a lambda function, where different versions represent different snapshots of your function. The exception in API is, that the API stages can be modified, whereas versions of a lambda function are immutable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…