Closed ian-vitaexmachina closed 6 years ago
this might be due to how you set up the custom authoriser. can you create a minimal project demonstrating the problem so we can investigate? we use --version staging
etc almost every day, so that part definitely works ok, and the culprit is somewhere else.
Ok cool. Yeah it definitely looked like the customer authenticator was erroring internally.
I removed the need for the authoriser, and the STAGING path worked fine, as you point out.
Anyway, I tore the whole API down and recreated it (using the latest version of claudia api builder) - and it works just fine now.
Thanks for your reply.
Expected behaviour: I promote my APIs to a --version of "staging", and when I execute those APIs using a URL with/staging/, it should execute against that alias
What actually happens: It only works if I do/latest/
In particular, it logs from my custom authoriser that there are not enough permissions to execute (it accesses dynamodb) - but that role has permission to dynamodb and works fine with LATEST. It just won't work with STAGING
I've manually combed over the API Gateway stage variables, and the link to the lambda function, and the alias to the lambda function does seem to be inheriting the same role as what is used for LATEST.
Any clues?