I am writing a third party widget that executes javascript client side to add a button to the users site. Essentially, the user will include a tag on their site that includes a path to my widget. The URL for that path will include the app_id for the particular user calling the widget. For example
<script src="www.widget.com/widget/{USER_ID}">
I want to be able to use AWS Lambda and API Gateway to do some quick authentication that the user is allowed to download the widget and serve the javascript content. This is super simple with something like res.sendFile in Express.js, but API Gateway doesn't seem to support sending a file. Is there any way that I can use API Gateway to serve the javascript quickly, without having to stringify the entire file?