Getting stack output?
Description: To perform automatic integration tests on my project, somehow I need to get the api. There is already the plugin serverless-stack-output for Serverless framework that serves the purpose. But I would like to achieve similar thing by AWS SAM after I deploy my application.
Meanwhile, If I can somehow get my api's base url as well as individual endpoints, then I'm able to connect them and and perform tests against them.
Expected result:
To get API Gateway endpoints + other invocation channels in a json file.
You can use the Outputs section of CloudFormation, and query for that using the API
Thank you. Yes, and I'm now looking at backend example which does so.
But following that example's way, I should define separate "output" for each function. This can easily lead to a mess when there are many functions in the app. Is there any way to make it shorter syntax?
Also, each api endpoint (e.g. in this case its "/resource") should be written and updated manually. Which can is annoying. Is there any way or any !REF that can get URL endpoint?
Agreed. I think it would be beneficial if SAM created some Outputs for you
Updating labels.