title: How to setup Oauth scopes at AWS Serverless Function?
body: <p>Issue: OAuth Scopes are empty at Method Request Settings using Cloudformation and AWS-SAM</p>
  <p>Apparently there are a few places where I can declare my authorization scopes, if I got it right, I should declare all scopes at the authorizer and the ones I would like to specify per function at my Function template.</p>
  <p>This is the template I am trying to fix:</p>
  <pre><code>MyServerlessFn
   Type: AWS::Serverless::Function
      Properties:
        FunctionName: helloWorldFn
        Description: my test using cognito.
        Handler: src/handlers/helloWorld.handler
        Runtime: nodejs12.x
        Events:
          ApplicationPostAPI:
            Type: Api
            Properties:
              Auth:
                AuthorizationScopes:
                  - https://foobar.acme.net/full-api
              Method: POST
              Path: /hello/world
              RestApiId: !Ref MyServerlessApi
  </code></pre>
  <p>using sam cli I can validate, build and deploy this template but the oauthScopes are empty when I check it using AWS web console.</p>
  <p>Here the aws doc:
  <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-apifunctionauth.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-apifunctionauth.html</a></p>