JetBrains / kotless

Kotlin Serverless Framework
Apache License 2.0
1.15k stars 58 forks source link

Enable access for Api gateway settings #84

Open sitole opened 3 years ago

sitole commented 3 years ago

Hey, i'm using Kotless for my free time projects and i discover some nice feature. My Spring API uses DynamoDb and creates homepage overview. This overview build takes 1 second. I want to improve it with CloudFront cache. So, i hide my API gateway link behind my own CloudFront distribution, but requests says Miss from CloudFront. After some research a discover Api gateway settings named Endpoint Type. Default Kotless option is EDGE, but this option deploy somewhere API gateway and cover it with CloudFront for better performance, but

Lambda -> API gateway –> Generated CloudFront –> My own CloudFront does not supports cache forward headers and my API response is not cached for time written in content-type header.

I manuly changed Endpoint Type to REGIONAL and everything works fine now! But next app deploy changes settings...

Its possible to enable some API gateway configuration in Gradle file?