1

I am creating a Node.js based lambda function to query an AmazonRDS instance in the same VPC as the Lambda instance. The codebase uses npm libraries, so it needs to be zipped then updated via the console.

I wrote the code, zipped the files, and ran the following command :

aws lambda update-function-code --function-name (the arn of the function) --zip-file fileb://~/path/to/function/queryDatabase .zip

However, the console displays no output, and the function is not updated when it is viewed from the web interface.

This is my package.json

{
  "dependencies": {
    "aws-sdk": "^2.784.0",
    "aws-xray-sdk-core": "2.4.0",
    "aws-xray-sdk-mysql": "2.4.0",
    "md5": "2.2.1",
    "mysql2": "2.1.0"
  }
}

How should I troubleshoot this issue? Thank you in advance!

1 Answer 1

1

The Lambda instance was compatible with Node version 12. My codebase was using version 15. Telling nvm to use version 12, deleting package-lock.json, and then reinstalling the modules fixed the problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.