# Disable Function Per Stage?

**URL:** <https://forum.serverless.com/t/disable-function-per-stage/604>\
**Category:** Serverless Framework\
**Created:** [October 20, 2016, 11:22pm UTC](https://forum.serverless.com/t/disable-function-per-stage/604 "2016-10-20T23:22:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![johncmckim](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/johncmckim/32/27_2.png) [@johncmckim](https://forum.serverless.com/u/johncmckim)\
**Post date:** [October 21, 2016, 6:04am UTC](https://forum.serverless.com/t/disable-function-per-stage/604/6 "2016-10-21T06:04:48Z")

</div>

> [@AdamM](#):
>
> Having them deployed is no issue I guess by disabled I mean no triggers or in the case of develop different triggers to master would work

@AdamM I would still deploy those functions but optionally disable certain logic per stage. You could do that by injecting the stage as an environment variable. You can then check the variable and not invoke certain logic based on that.

I wouldn’t avoid triggering those lambdas, otherwise how do you know those triggers actually work? Just stub out what you need to and log that it was triggered. That said, if you’re only execute code in production, you run a real risk of having issues that only appear in production.

---

_[View the full topic](https://forum.serverless.com/t/disable-function-per-stage/604)._
