Skip to content

aws_apigatewayv2: Can't define HTTP API Step Functions integration with JWT authorizer #28904

@mrichman

Description

@mrichman

Describe the bug

This should behave similarly to the REST API construct

Expected Behavior

Either of these approaches should work:

httpApi.addRoutes({
      path: '/execute',
      methods: [apigwv2.HttpMethod.POST],
      integration: StepFunctionsIntegration.startExecution(props.stateMachine)
      authorizer: jwtAuthorizer,
      authorizationType: AuthorizationType.JWT,
      credentialsRole: credentialsRole,
    };

    new CfnRoute(this, 'StepFunctionRoute', {
      apiId: httpApi.apiId,
      routeKey: 'POST /execute',
      target: `integrations/${integration.ref}`,
      authorizationType: HttpAuthorizerType.JWT,
      authorizerId: jwtAuthorizer,
    });

Current Behavior

Can't get this to compile because of error:

Type 'AwsIntegration' is missing the following properties from type 'HttpRouteIntegration': id, _bindToRoute, completeBind

Reproduction Steps

See code example

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.124.0 (build 4b6724c)

Framework Version

No response

Node.js Version

v20.11.0

OS

Ubuntu 20.04

Language

TypeScript

Language Version

TypeScript (5.3.3)

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-apigatewayv2Related to Amazon API Gateway v2bugThis issue is a bug.effort/mediumMedium work item – several days of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions