Adding an endpoint to your Lambda function :-
Open the Functions page of the Lambda console.
Choose a function.
Under Function overview, choose Add trigger.
Select API Gateway.
Choose Create an API or Use an existing API.
New API: For API type, choose HTTP API. For more information, see API types.
Existing API: Select the API from the dropdown menu or enter the API ID (for example, r3pmxmplak).
For Security, choose Open.
Choose Add.
https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html#apigateway-add