# Existing lambda function

**URL:** <https://forum.serverless.com/t/existing-lambda-function/17472>\
**Category:** Serverless Framework\
**Created:** [August 3, 2022, 2:41pm UTC](https://forum.serverless.com/t/existing-lambda-function/17472 "2022-08-03T14:41:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![acate](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@acate](https://forum.serverless.com/u/acate)\
**Post date:** [August 3, 2022, 2:41pm UTC](https://forum.serverless.com/t/existing-lambda-function/17472/1 "2022-08-03T14:41:30Z")

</div>

I inherited a couple of AWS lambda functions from a former co-worker. The functions were built directly in the AWS Lambda online console. Both functions have file creation/edit event triggers for an S3 bucket. I’d like to convert both functions to one severless project so I can much more easily edit, test, and deploy to our staging and production versions of the functions. I’ve tried setting up a serverless.yml file to mimic what I see in the AWS Lambda console, but encounter issues when trying to deploy. The issues seem to focus on the s3 bucket trigger. Anyone know of resources I can go and read about converting existing AWS Lambda functions to a serverless project? Thanks.

---

<div class="post-metadata">

**Author:** ![Denzik](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@Denzik](https://forum.serverless.com/u/Denzik)\
**Post date:** [August 3, 2022, 10:41pm UTC](https://forum.serverless.com/t/existing-lambda-function/17472/2 "2022-08-03T22:41:29Z")

</div>

Good Article for reference here:

> **[Serverless Framework - IAM Permissions For Functions](https://www.serverless.com/framework/docs/providers/aws/guide/iam)**
>
> How to manage your AWS Lambda functions and their AWS infrastructure resources easily with the Serverless Framework.

I’d have a look at the section titled:

## The Default IAM Role

It’ll probably come down to getting the correct “Allow” actions for the Lambdas.

Also that the S3 Cloudwatch or some other SNS events trigger the lambdas correctly and have the proper “lambda:Invoke” permissions in your template. something like this…

```auto
 - Effect: "Allow"
          Action: 
            - "lambda:InvokeFunction"
          Resource: "*"

```

Good Luck!
