DianaIonita / serverless-api-gateway-throttling

A plugin for the Serverless framework which configures throttling for API Gateway endpoints.
ISC License
69 stars 7 forks source link

Does not work with "serverless-aws-alias" plugin #6

Closed ValeryP closed 3 years ago

ValeryP commented 4 years ago

I've realized that the plugin does not work for aliases. Every time I deploy to any alias it performs all actions on the stage instead of the alias name.

Plugins:

plugins:
  - serverless-python-requirements
  - serverless-aws-alias
  - serverless-api-gateway-caching
  - serverless-api-gateway-throttling

Fun:

functions:
  energy:
    handler: src/handler.energy
    package: {}
    events:
      - http:
          path: energy
          method: get
          cors: true
          private: true
          apiGatewayThrottling:
            maxRequestsPerSecond: 10
            maxConcurrentRequests: 5

Am I doing something wrong or is there any workaround? Thanks!

P.S. Sorry for the template text of the issue but it seems I became a hard user of your plugins 😄

DianaIonita commented 4 years ago

Hi @ValeryP,

Thanks for raising the issue here as well. As I mentioned, there are no plans to add support for other plugins. However, it does seem like you can configure throttling settings as part of the serverless-aws-alias plugin: https://www.npmjs.com/package/serverless-aws-alias#the-aliasstage-configuration-object

Hopefully that solves your problem.