# Executing a lambda upon stage creation

**URL:** <https://forum.serverless.com/t/executing-a-lambda-upon-stage-creation/1678>\
**Category:** Serverless Framework\
**Created:** [April 10, 2017, 12:24am UTC](https://forum.serverless.com/t/executing-a-lambda-upon-stage-creation/1678 "2017-04-10T00:24:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdichiara](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@cdichiara](https://forum.serverless.com/u/cdichiara)\
**Post date:** [April 10, 2017, 12:24am UTC](https://forum.serverless.com/t/executing-a-lambda-upon-stage-creation/1678/1 "2017-04-10T00:24:48Z")

</div>

I was wondering if anyone is kicking off a lambda function upon stage deploy? I thought there might be a plugin that allows this, but I haven’t found the functionality yet … I’d like to configure a bunch of default DynamoDb entries automatically instead of manually. I suppose I could use an AWS CLI call to invoke it, so all I would need is a way to execute a batch script upon serverless stage deploy?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![buggy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/buggy/32/177_2.png) [@buggy](https://forum.serverless.com/u/buggy)\
**Post date:** [April 10, 2017, 2:28am UTC](https://forum.serverless.com/t/executing-a-lambda-upon-stage-creation/1678/2 "2017-04-10T02:28:39Z")

</div>

For what it’s worth… I’m using npm to handle building and deployment (i.e. lint, compile, test deploy, etc). It would be pretty easy to add an extra step to invoke a lambda post deployment.

---

<div class="post-metadata">

**Author:** ![cdichiara](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@cdichiara](https://forum.serverless.com/u/cdichiara)\
**Post date:** [April 16, 2017, 1:32pm UTC](https://forum.serverless.com/t/executing-a-lambda-upon-stage-creation/1678/3 "2017-04-16T13:32:48Z")

</div>

Yeah, that’s a good point … I’m not a webpack expert, but I was thinking about exploring whether to do this there. You’ve now reminded me of a viable alternative, thanks @buggy!
