sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.09k stars 126 forks source link

[ApiGatewayV2][JWT] Maximum number of Authorizers for this API has been reached. #557

Closed goto3 closed 1 week ago

goto3 commented 2 weeks ago

Hello, I am receiving this error when I try to deploy more than 10 routes in my ApiGatewayV2 with jwt:

ApiRouteSvmcdnAuthorizerXvausr aws:apigatewayv2:Authorizer
StatusCode: 429, RequestID: 6aa502cc-14f2-45d8-ad4c-301b7bef6b5b,
ConflictException: Maximum number of Authorizers for this API has been reached. Please contact AWS if you need additional Authorizers.

my sst.config.ts:

    /// //API
    const api = new sst.aws.ApiGatewayV2('Api', {
    });
    const functionOptions = {
      auth: {
        jwt: {
          audiences: [userPoolClient.id],
          issuer: $interpolate`https://cognito-idp.${REGION}.amazonaws.com/${userPool.id}`,
        },
      },
    };  

    api.route('GET /people', {
      handler: 'backend/lambda/people/getAll.main',
      environment: {
        LOCAL_DB_CONNECTION,
      },
    }, functionOptions);

    ... 10 more routes

I am using latest version of SST 0.0.421, node v20 on macOS

goto3 commented 1 week ago

Fixed in v0.0.433 https://github.com/sst/ion/commit/86f2fe954351750fa7d5ccc86372a60a9e1c927e

Thank you @thdxr