Closed kylebarron closed 4 years ago
oh that's interesting, I didn't know about it.
Failed to load API definition: undefined /docs/docs/openapi.json
Yeah this must be a lambda-proxy https://github.com/vincentsarago/lambda-proxy issue
Not sure if I'll have time to look at this right now sadly
No rush, this just seemed like something that might be worth checking out eventually.
Similar to the /docs
endpoint, when loading the tileJSON at
https://naip-lambda.kylebarron.dev/4c4d507790e8afa837215677bd6f74f58711bfaf3e1d5f7226193e12/tilejson.json
its tiles
key was
https://naip-lambda.kylebarron.dev/4c4d507790e8afa837215677bd6f74f58711bfaf3e1d5f7226193e12/tilejson.json/4c4d507790e8afa837215677bd6f74f58711bfaf3e1d5f7226193e12/{z}/{x}/{y}@1x
i.e. relative path was made to the tileJSON, not to the root path. I reverted to the REST endpoint, which is working fine. I don't understand API Gateway well enough now to know what's wrong, but it seems like a few changes would need to be made to support the HTTP endpoint in the future.
yeah the whole API gateway URL stuff is a 🕳 . But I'll have a look later for sure
Unless you have an objection, we could set the default endpoint to use the HTTP API instead of the REST API. I don't think there's a downside unless you used a type of identity verification
In December, AWS announced HTTP API Gateway endpoints, which appear to be 70% cheaper than the existing REST endpoint type and slightly faster.
I was wondering if there was a specific reason you use the REST endpoint type instead of the newer HTTP type in your
serverless.yml
?It looks like you can use HTTP in
serverless.yml
with thehttpApi
key. The full spec appears to be here. It looks like the syntax is slightly different than thehttp
key. I tried it out for a couple endpoints successfully, but some internal paths get messed up, like trying to load/docs
gives an error: