-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Hi there. I'm learning KMM and I have written a test project Kotlin library. I wanted to make a quick website which showed the documentation and also had a window for people to try out the library live. For this, I want to use something like the kotlin playground, with this as the backend. For the backend, I want to:
-
Add my library as a dependency this server (I think I did this well enough - I added mavenLocal() which I've installed my library to and I added my library as a dependency - 2 lines of build script total)
-
Create an AWS Lambda function so that my website (which doesn't exist yet) can make HTTP requests to this AWS function (via an AWS API Gateway).
I'm stuck on the latter. As an aside, it would be useful to have more documentation here for how I should configure my AWS function. For example, I think I needed to create a new AWS Lambda function (I did everything via the AWS website as the aws CLI wasn't working properly on my machine), using Java 8 runtime. Then I needed to upload the ZIP, which needs to be done by first creating an S3 bucket and uploading it to that. And then I need to add a trigger using AWS API Gateway, with HTTP rather than REST (right?), and then I wasn't sure about stages so I left that default. Also I wasn't sure about CORS so I checked that box because it sounded necessary. Maybe I'm a noob but not much of this was obvious.
Anyway, I've now created my Lambda function but when I run curl -X GET https://dthvag45o1.execute-api.eu-west-2.amazonaws.com/versions I get a 500 error:
< HTTP/2 500
< date: Sat, 27 Feb 2021 16:08:28 GMT
< content-type: application/json
< content-length: 35
< apigw-requestid: baYzbg_SLPEEMxA=
<
{"message":"Internal Server Error"}
I have no way to debug this. I've no idea what I did wrong. The Lambda function's dashboard is registering that it saw an error. Although, I get the same error when putting any string instead of versions.
Do you have any advice?