Feature Request: API Gateway Direct Resolvers (AppSync-style without VTL) #3749
aleguern-azivko
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Request: API Gateway JavaScript Resolvers (AppSync-style JS)
Description
This PR proposes adding AppSync-style JavaScript resolvers to SAM for API Gateway, allowing direct integration with AWS services without the need for Lambda functions or VTL templates.
Problem Statement
Currently, connecting API Gateway to AWS services like DynamoDB requires:
Example of unnecessary Lambda boilerplate:
Proposed Solution
Add AppSync-style JavaScript resolvers to SAM for API Gateway, allowing templates like:
Implementation Details
The implementation would closely mirror AppSync's JavaScript resolver pattern:
Runtime: Support for JavaScript (APPSYNC_JS) runtime to align with AppSync's model
Data Sources: Support for direct connections to:
JavaScript Functions:
request
andresponse
Built-in Utility Library:
Context Object:
Provide rich context similar to AppSync's JavaScript resolvers:
Response Handling:
Benefits
I believe this feature would significantly improve the developer experience for SAM users by eliminating unnecessary Lambda functions for common data access patterns while providing the flexibility and power of JavaScript.
Beta Was this translation helpful? Give feedback.
All reactions