# Aws lambda function under a path

**URL:** <https://forum.serverless.com/t/aws-lambda-function-under-a-path/7843>\
**Category:** Serverless Framework\
**Tags:** lambda\
**Created:** [March 28, 2019, 11:40pm UTC](https://forum.serverless.com/t/aws-lambda-function-under-a-path/7843 "2019-03-28T23:40:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ak1](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@ak1](https://forum.serverless.com/u/ak1)\
**Post date:** [March 28, 2019, 11:40pm UTC](https://forum.serverless.com/t/aws-lambda-function-under-a-path/7843/1 "2019-03-28T23:40:28Z")

</div>

I am playing with serverless framework. I have this problem.  
How to configure serverless.yml so that the function is created under a path? Aws resource/arn path not the http path.

---

<div class="post-metadata">

**Author:** ![Hills](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hills/32/3155_2.png) [@Hills](https://forum.serverless.com/u/Hills)\
**Post date:** [April 4, 2019, 11:46pm UTC](https://forum.serverless.com/t/aws-lambda-function-under-a-path/7843/2 "2019-04-04T23:46:44Z")

</div>

Hi Ak1,  
What has worked for me is to have the git file structure under a path.  
For instance, your yml lives on the root of the file structure.  
Your code might live under `/functionFolderName/handler.js`  
In the yml, the path under handler just don’t start it with a forward slash “/”.  
`"handler":"functionFolderName/handler.getMyFunction",`  
With `sls deploy` it ends up in a path in lambda.  
I am still figuring out what the best code structure of a project is. Presently, I have yml’s for each Lambda function. Trying to look at it as distinct parts of functionality.  
If you have any insights, please let me know.
