I aws create a 2 api-gateway
- First one
https://xx.xx-api.us-east-1.amazonaws.com/v1/uploadapi/?search=all
then my lambda function will invoke below
searchone = es.search(index="my-index", body={"query": {"match_all": {}}})
return searchone
- Second One
https://xx.xx-api.us-east-1.amazonaws.com/v1/uploadapi/?search=matchphrase=name_computer
searchtwo = es.search(index="my-index", body={"query": {"match": {"name":"computer"}}})
return searchtwo
Basically need to create single
lambda function
if api url is first one then return searchone
if the api url is second one then return searchtwo
Disclaimer ? DO i need to create separate Lambda function for above two api's