How to enable throttling and set burst & rate limit for the lambda exposed via API GW

Is it possible to enable throttling and set burst & rate limit for the lambda exposed via API GW if I configure function like this on serverless.yaml?

functions:
  sync-bucket:
    handler: com.my.util.lambda.Handler
    timeout: 60
    events:
      - http:
          path: /sync-bucket
          method: get
1 Like

Realised this can be achieved via usage plan, (But global to all the API’s configured in the serverless.yml)

apiKeys:
    - ${$self:stage}-apiKey
  usagePlan:
    throttle:
      burstLimit: 1
      rateLimit: 1
1 Like