Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ApiGatewayV2] integration subtype - sqs #10497

Closed
dsoshawn opened this issue Sep 23, 2020 · 5 comments
Closed

[ApiGatewayV2] integration subtype - sqs #10497

dsoshawn opened this issue Sep 23, 2020 · 5 comments
Labels
@aws-cdk/aws-apigatewayv2-integrations Related to AWS APIGatewayv2 Integrations closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@dsoshawn
Copy link

dsoshawn commented Sep 23, 2020

:Question: -->

While declaring AWS::ApiGatewayV2::Integration resource to create an integration with SQS, the option IntegrationSubtype is available in CloudFormation documentation =>
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html#cfn-apigatewayv2-integration-integrationsubtype

However, the construct IntegrationSubtype is not available while working with CDK =>
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigatewayv2.CfnIntegration.html

I need to configure IntegrationSubtype with CDK.
Is this a limitation on the CDK end here, as CloudFormation already supports the subtype key?
or Is there any alternative to workaround this such that I can configure IntegrationSubtype using CDK ?

@dsoshawn dsoshawn added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 23, 2020
@SomayaB SomayaB changed the title [AWS::ApiGatewayV2::Integration] No CDK documentation for property IntegrationSubtype [ApiGatewayV2] No CDK documentation for property IntegrationSubtype Sep 23, 2020
@github-actions github-actions bot added the @aws-cdk/aws-apigatewayv2 Related to Amazon API Gateway v2 label Sep 23, 2020
@rrhodes
Copy link
Contributor

rrhodes commented Sep 26, 2020

Hi @dsoshawn,

Looking at the CDK documentation for CfnIntegrationProps I see an option for IntegrationSubtype as expected.

Looks like there's no custom CDK constructs for "AWS::ApiGatewayV2::Integration" resource yet, but the above appears sufficient for your needs using CDK.

If I've misunderstood the problem, give me a shout, happy to investigate further.

@nija-at nija-at added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 and removed guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Jan 14, 2021
@nija-at nija-at changed the title [ApiGatewayV2] No CDK documentation for property IntegrationSubtype [ApiGatewayV2] support for integration subtypes Jan 14, 2021
@nija-at
Copy link
Contributor

nija-at commented Jan 14, 2021

Moving this as a feature request.

Until this is implemented, you can use escape hatches or Cfn construct types (pointed out by @rrhodes) to use this feature

@hoegertn
Copy link
Contributor

Using the L1 this is possible as pointed out. Example:

  const api = new apigw.HttpApi(this, 'eventbridge-api', {
      createDefaultStage: true,
    });
    const integ = new apigw.CfnIntegration(this, 'Integ', {
      apiId: api.httpApiId,
      integrationType: 'AWS_PROXY',
      integrationSubtype: 'EventBridge-PutEvents',
      credentialsArn: role.roleArn,
      requestParameters: {
        Source: 'Gateway',
        Detail: '$request.body',
        DetailType: "api-call",
        EventBusName: eventBus.eventBusArn,
      },
      payloadFormatVersion: '1.0',
      timeoutInMillis: 10000,
    });
    new apigw.CfnRoute(this, 'DefaultRoute', {
      apiId: api.httpApiId,
      routeKey: apigw.HttpRouteKey.DEFAULT.key,
      target: `integrations/${integ.ref}`,
    });

I needed this for some projects and have it on my todo list to implement an AwsIntegration L2.

Is somebody else working on it?

@nija-at nija-at changed the title [ApiGatewayV2] support for integration subtypes [ApiGatewayV2] integration subtype - sqs Jan 14, 2021
@nija-at nija-at added @aws-cdk/aws-apigatewayv2-integrations Related to AWS APIGatewayv2 Integrations and removed @aws-cdk/aws-apigatewayv2 Related to Amazon API Gateway v2 labels Jan 14, 2021
@nija-at
Copy link
Contributor

nija-at commented Jan 14, 2021

I've repurposed this issue to only refer to the sqs subtype so as to track each one. Here's another one for step functions - #11947

@github-actions
Copy link

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apigatewayv2-integrations Related to AWS APIGatewayv2 Integrations closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants