amazon web services – MissingRequiredDependencyError aws-sdk

I have nodejs app which is being deployed as a lambda. All of a sudden I find myself getting this error and I don’t believe I’ve changed anything.

My understanding was that the aws-sdk didn’t need to be packaged as a dependency given that those libs already existed in the lambda environment.

Has anyone else seen this and does this seem odd to anyone else?

Response
{
  "errorType": "MissingRequiredDependencyError",
  "errorMessage": "The \"aws-sdk\" package is missing. \n    Please, make sure to install this library ($ npm install aws-sdk).",
  "trace": [
    "MissingRequiredDependencyError: The \"aws-sdk\" package is missing. ",
    "    Please, make sure to install this library ($ npm install aws-sdk).",
    "    at Object.t.loadPackage (/var/task/index.js:16:1712339)",
    "    at t.Connection.loadOrInitiateDocumentClient (/var/task/index.js:16:1729895)",
    "    at new t.Connection (/var/task/index.js:16:1727956)",
    "    at t.ConnectionManager.create (/var/task/index.js:16:1725709)",
    "    at l (/var/task/index.js:16:1722093)",
    "    at Object.86184 (/var/task/index.js:16:995278)",
    "    at __webpack_require__ (/var/task/index.js:16:2376966)",
    "    at Object.95413 (/var/task/index.js:16:995945)",
    "    at __webpack_require__ (/var/task/index.js:16:2376966)",
    "    at Object.25860 (/var/task/index.js:16:976079)"
  ]
}

Read more here: Source link