So AWS has a stored-proc-like language VTL (Velocity) and it is similar to...
So AWS #APIGateway has a stored-proc-like language VTL (Velocity) and it is similar to Jinja. If you use it, you can sometimes cut out the middleman (the AWS Lambda) and call some AWS service directly and let the Gateway handle auth, logging, etc. But now you got a limited, weird ass language in your stack.
Self-replies
I don't think this is a first-choice technology- it is a duct tape technology that lets maintenance developers do limited fixes to API calls if they don't control the backend server.
The other time I've seen this pattern is Lua scripts in REDIS and Elasticache-- Same pattern, you create a layer where the maintenance developers can try to fix something should they be unable to fix the other tiers. But now you have to have Lua capable devs on the team.
Back to API Gateway- you probably don't want to call your AWS services directly because VTL can't do complex logic, like batching API requests or conditionals, where you decide not to call the service. And that matters if the API call costs $