Stages help keep different versions of api active, typically used to maintain multiple environments. we can have stages like dev, qa, prod, etc.
Any changes we make to API will not be effective until we deploy to a particular stage.(unless auto-deploy is enabled)
Finally the route will be
https://${apidId}.execute-api.us-east-1.amazonaws.com/${stage}/${route}
Example 1: For /staff route, $default stage , abcdefgh api
https://abcdefgh.execute-api.us-east-1.amazonaws.com/staff
Example 2: for /staff route, dev stage , abcdefgh api
https://abcdefgh.execute-api.us-east-1.amazonaws.com/dev/staff
Example 3: for / route, $default stage , abcdefgh api
https://abcdefgh.execute-api.us-east-1.amazonaws.com/
So, the $default path you are using in lambda function is because you are using $default stage.
For HTTP Api ,
When defining a new api, we can set the stage, which by default is $default
or we can add stages after it is created.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…