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

240
Views
aws lambda update-function-code: syntax error

I'm trying to update a Lambda function using this command:

aws lambda update-function-code --function-name my-function --zip-file fileb://package.zip

However, this results in a Windows Script Host error:

/path/to/aws.js
Line: 1
Char: 1
Error: Syntax error
Code: 800A03EA
Source: Microsoft JScript compilation error

The contents of aws.js:

const AWS = require('aws-sdk');

exports.dynamodb = new AWS.DynamoDB.DocumentClient({
  api_version: '2012-08-10',
  region: 'us-east-1'
});

exports.iot = new AWS.IotData({
  apiVersion: '2015-05-28',
  endpoint: 'redacted.iot.us-east-1.amazonaws.com',
  region: 'us-east-1'
});

exports.AWS = AWS;

If I run this file using node (node /path/to/aws.js), I get no output. If I double-click on the file, I get the same error.

It seems like aws lambda update-function-code is checking the file for syntax errors, but not using node.

I don't see any node syntax errors. How can I solve this?

I'm using NVM for Windows (I'm on Windows 10), and node v10.23.0 is active. I have successfully updated this function before, and I made no changes to aws.js.

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!