claudiajs / claudia-bot-builder

Create chat bots for Facebook Messenger, Slack, Amazon Alexa, Skype, Telegram, Viber, Line, GroupMe, Kik and Twilio and deploy to AWS Lambda in minutes

Home Page:https://claudiajs.com/claudia-bot-builder.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Executing against an alias other than LATEST isn't working

ian-vitaexmachina opened this issue · comments

  • Expected behaviour:
    I promote my APIs to a --version of "staging", and when I execute those APIs using a URL with <my_domain>/staging/, it should execute against that alias

  • What actually happens:
    It only works if I do <my_domain>/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?

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.