Open juaoose opened 1 month ago
Thanks for the suggestion.
It would be possible, but there would be challenges. Unlike some services like SQS, we use different code to create APIs based upon the context - for service integration we use the RestApi L2 construct, for Lambda integration we use the LambdaRestApi L2 construct, etc. Each construct then has significant code at the Construct level that configures resources and methods through code rather than declaratively through props.
If the apigateway-sqs construct were to receive a API created by the apigateway-lambda construct, there would be basic configuration issues that would likely cause issues. If the API were passed to a new instance of the aws-apigateway-sqs construct, then our resource names would collide.
So it's not impossible, but it would be difficult. We'll add it to our backlog to consider in the future.
In the meantime, integrating a API with 2 (or more) Lambda functions is possible with our recent aws-openapigateway-lambda construct.
This is a question:
Is it possible to provide an existing API GW to
ApiGatewayToSqs
, from looking at the code it looks like not? Would this be a potential feature?