Proposal: API Gateway Integration Resource #3535
brysontyrrell
started this conversation in
Ideas
Replies: 1 comment
-
Thanks for this proposal @brysontyrrell! Really like this idea, I'm gonna pass this on to the product team for prioritization. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
This is related to #651 where it was requested to have a way to apply an
Event
to certain CloudFormation Resources. The ask was to simplify the integration of API Gateway to other AWS services like SQS, SNS, DynamoDB, etc.To do this today, one needs to pour through API Gateway documentation, posted online examples, and stitch together a full swagger definition for their API. The simplify of SAM is lost when the swagger definition is brought into play.
I'd like to propose the introduction of a new SAM type meant to represent an AWS service integration to an API Gateway and generate the required swagger elements/extensions for the developer.
Current Example
Here is a template from an example I posted in that issue (integrating an SQS queue with an API Gateway):
Proposed Example
I won't pretend to know much about performing these service integrations. The idea with my proposed model is to strip away the swagger work and match how other SAM resources operated. All of the information required to infer the SQS integration in swagger are present in the
Service
payload (assuming the intent of this integration is to sent the HTTP payload as theMessageBody
).This resource would support multiple service types much like
Events
with functions. If aRestApiId
is not provided it would use the implicit API created by SAM. The resource policy would be generated automatically using the!Ref
s between the API and the queue.I think there's a huge opportunity for SAM to make these types of service integrations easier to adopt for AWS developers. While we hear and know that having a Lambda in-between an API and a service can be a waste, or unnecessary, it's usually the easier path.
Beta Was this translation helpful? Give feedback.
All reactions