Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
Getting 502 error when adding `const solc = require('solc')` to AWS lambda function

I'm getting 502 responses when trying to simply add const solc = require('solc') to a deployed AWS lambda function. I've successfully used used a variety of different node packages in this lambda function with no problems. Also, I've used the solc module locally and in other contexts with no problems. What can I do to get to successfully require the solc module?

Lambda function:

const solc = require('solc')

module.exports = {
  constructContractTx: async(event, web3) => {
    // compileContract(event)
    return {
      body: 'testing',
      status: 200
    }
  }
}

package.json:

{
  "name": "...",
  "version": "1.0.0",
  "description": "...",
  "main": "app.js",
  "repository": "...",
  "author": "Chris Dougherty",
  "license": "MIT",
  "dependencies": {
    "@alch/alchemy-web3": "^1.1.9",
    "@ethereumjs/common": "^2.6.2",
    "@ethereumjs/tx": "^3.5.0",
    "axios": "0.21.1",
    "dotenv": "^15.0.0",
    "faunadb": "^4.4.1",
    "fs": "^0.0.1-security",
    "path": "^0.12.7",
    "solc": "0.8.10",
    "web3": "1.5.2"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!