Define authorization scopes for cognito user pool

my question is in reference to this issue

since there currently seems to be no way to define Oauth scopes in your serverless configuration each time I re-deploy my API I have to go back into the aws api gateway UI and re-set the scopes for the authorization defined for my route. I was wondering if anyone has come up with a clever work around?

Once I make the changes in the UI the changes are reflected in the swagger.json that you can export from api gateway. I’m wondering if there is a way I can update this configuration as part of my deploy process or prevent this setting from being overridden each time I re-deploy.

this is how I have the endpoint configured in the serverless.yml

  - http:
      method: get
      path: customer
            ACCT_NUM: true
      cors: true
        name: authorizer
        arn: arn:aws:cognito-idp:us-east-1xxxxx
        identitySouce: method.request.header.Authorization