# How to create an AWS Lambda under an exiting AWS API Gateway?

**URL:** <https://forum.serverless.com/t/how-to-create-an-aws-lambda-under-an-exiting-aws-api-gateway/15091>\
**Category:** Serverless Framework\
**Tags:** api-gateway\
**Created:** [May 22, 2021, 8:18pm UTC](https://forum.serverless.com/t/how-to-create-an-aws-lambda-under-an-exiting-aws-api-gateway/15091 "2021-05-22T20:18:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aniruddha](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/aniruddha/32/4142_2.png) [@aniruddha](https://forum.serverless.com/u/aniruddha)\
**Post date:** [May 22, 2021, 8:18pm UTC](https://forum.serverless.com/t/how-to-create-an-aws-lambda-under-an-exiting-aws-api-gateway/15091/1 "2021-05-22T20:18:25Z")

</div>

If I have an existing AWS API Gateway, How can I map it to the AWS Lambda event?  
eg. Need to create a new resource path under an existing API Gateway and attach it as an event to the lambda function

---

<div class="post-metadata">

**Author:** ![berimbolo](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@berimbolo](https://forum.serverless.com/u/berimbolo)\
**Post date:** [May 31, 2021, 3:17pm UTC](https://forum.serverless.com/t/how-to-create-an-aws-lambda-under-an-exiting-aws-api-gateway/15091/2 "2021-05-31T15:17:08Z")

</div>

The way that I do this (I create my API gateway with terraform) is that I push the API gateway ID’s into SSM parameter store and then retrieve them when I deploy the serverless project.
