I am trying to remove the redundant path which is used in both my serverless configuration and aws api gateway mapping.
Problem: Login serverless yaml
serverless.yml
... functions: login: name: login handler: login.handler events: - http: path: login ...
API mapping to my custom domain
- API – login-dev
- Stage – dev
- Path(optional) – login
Goal: Lambda Functions :
- login – {base url}/dev/login
- register – {base url}/dev/register
Actions taken:
- Tried to remove the Path(optional) but it would not allow me to add another lambda function if path is omitted.
- Tried to proxy(unsure if this works the way i understand it) but it doesn;t allow because an error shows that {login} is used in one of my lambda function parameters.
- Removed path in serverless yaml configuration file and replaced it with blank or / – but not an option for me because i need to keep the existing configuration.
Any help is very much appreciated.
Anonymous Asked question May 14, 2021
Recent Comments