Q: Getting error while deploying in lambda using serverless framework. I did the npm install still showing the issue In my current project i have added the serverless frame work The YML file is:
service: ****

provider:
 name: aws
 runtime: nodejs12.x
 memorySize: 128
 timeout: 10
 stage: staging
 region: us-east-1

 plugins:
  - serverless-plugin-tracing
  
functions:
 api:
   handler: lambda.universal
   events:
     - http: ANY {proxy+}
     - http: ANY /    

and the environment files i have added in lambda
then just run the serverless deploy and in watch cloudwatch got this issue
ec04fe10-4f88-42b0-b5c6-8f60846f9dc1    ERROR   Error: The requested resource couldn't be found
        at /var/task/app.js:81:15
        at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
        at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13)
        at /var/task/node_modules/express/lib/router/index.js:284:7
        at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
        at next (/var/task/node_modules/express/lib/router/index.js:275:10)
        at SessionStrategy.strategy.pass (/var/task/node_modules/passport/lib/middleware/authenticate.js:338:9)
        at SessionStrategy.authenticate (/var/task/node_modules/passport/lib/strategies/session.js:75:10)
        at attempt (/var/task/node_modules/passport/lib/middleware/authenticate.js:361:16)
        at authenticate (/var/task/node_modules/passport/lib/middleware/authenticate.js:362:7)
        at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
        at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13)
        at /var/task/node_modules/express/lib/router/index.js:284:7
        at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
        at next (/var/task/node_modules/express/lib/router/index.js:275:10)
        at initialize (/var/task/node_modules/passport/lib/middleware/initialize.js:53:5)
        at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
        at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13)
        at /var/task/node_modules/express/lib/router/index.js:284:7
        at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12)
        at next (/var/task/node_modules/express/lib/router/index.js:275:10)
        at urlencodedParser (/var/task/node_modules/body-parser/lib/types/urlencoded.js:91:7)
    2021-02-28T11:56:01.096Z ec04fe10-4f88-42b0-b5c6-8f60846f9dc1 ERROR Error: The requested resource couldn't be found at /var/task/app.js:81:15 at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13) at /var/task/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12) at next (/var/task/node_modules/express/lib/router/index.js:275:10) at SessionStrategy.strategy.pass (/var/task/node_modules/passport/lib/middleware/authenticate.js:338:9) at SessionStrategy.authenticate (/var/task/node_modules/passport/lib/strategies/session.js:75:10) at attempt (/var/task/node_modules/passport/lib/middleware/authenticate.js:361:16) at authenticate (/var/task/node_modules/passport/lib/middleware/authenticate.js:362:7) at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13) at /var/task/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12) at next (/var/task/node_modules/express/lib/router/index.js:275:10) at initialize (/var/task/node_modules/passport/lib/middleware/initialize.js:53:5) at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/var/task/node_modules/express/lib/router/index.js:317:13) at /var/task/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/var/task/node_modules/express/lib/router/index.js:335:12) at next (/var/task/node_modules/express/lib/router/index.js:275:10) at urlencodedParser (/var/task/node_modules/body-parser/lib/types/urlencoded.js:91:7)


A: Seems like your "plugins" indentation is wrong. It should not fall under provider.
