# Re-deploy an updated aws lambda

**URL:** <https://forum.serverless.com/t/re-deploy-an-updated-aws-lambda/9770>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [November 5, 2019, 10:41am UTC](https://forum.serverless.com/t/re-deploy-an-updated-aws-lambda/9770 "2019-11-05T10:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cantordust](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cantordust](https://forum.serverless.com/u/cantordust)\
**Post date:** [November 5, 2019, 10:41am UTC](https://forum.serverless.com/t/re-deploy-an-updated-aws-lambda/9770/1 "2019-11-05T10:41:46Z")

</div>

Hi community,

I’ve been playing around with the serverless framework for node since a past couple of days and would like to start by saying kudos to the dev-team building an amazing framework. It’s been really easing out the hefty process of building, testing and deploying things on aws 😃

I’ve been trying to plug a lambda function to an existing s3 bucket which is configured for all **s3:createObject:** \* events, I would like to know how do I re-deploy a lambda function (written in node) via the serverless framework once i’ve made some changes to it on my local machine.

Thanks

---

<div class="post-metadata">

**Author:** ![ferschubert](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/ferschubert/32/3942_2.png) [@ferschubert](https://forum.serverless.com/u/ferschubert)\
**Post date:** [November 5, 2019, 12:54pm UTC](https://forum.serverless.com/t/re-deploy-an-updated-aws-lambda/9770/2 "2019-11-05T12:54:27Z")

</div>

Hello @cantordust, let me see if I can help you.

To add a trigger to Lambda based on an existing S3 bucket you must do:

functions:  
users:  
handler: users.handler  
events:

- s3:  
bucket: legacy-photos  
event: s3:ObjectCreated:\*  
rules:  
- prefix: uploads/  
- suffix: .jpg  
**existing: true**  
Link to docu: [https://serverless.com/framework/docs/providers/aws/events/s3/](https://serverless.com/framework/docs/providers/aws/events/s3/)

I am assuming your lambda is created through serverless. Let me know if this was helpful if not could you please detail your current scenario (manually created or serverless created lambda for example).
