conn.login not working when hosted on AWS Lambda with Node8.10
See original GitHub issueHello everyone,
I am currently running a script on AWS Lambda using jsforce. I need to update the runtime from Node6.10 to 8.10. However, while I manage to make the script work locally with the 8.10 version, it is not working on AWS Lambda.
For some reasons, this piece of code is not working anymore on AWS Lambda.
let connnection = new jsforce.Connection( { loginUrl: 'https://eu16.salesforce.com' } );
connnection.login( config.get( 'salesforce_login' ), config.get( 'salesforce_password' ), function( err ) {
if ( err ) { return logger.error( err, true ); }
instance = connnection.instanceUrl;
token = connnection.accessToken;
} );
Any idea about what could be the issue ?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
Troubleshoot networking issues in Lambda
Issue : Your Lambda function needs access to AWS services without using the internet. To connect a function to AWS services from a...
Read more >Troubleshoot Lambda function failures in Amazon Connect
The AWS Lambda function that I added to my Amazon Connect instance fails to invoke when my contact flow tries to invoke the...
Read more >AWS Lambda function errors in Node.js
exports.handler = async function() { return x + 10 }. This code results in a reference error. Lambda catches the error and generates...
Read more >Troubleshoot invocation issues in Lambda
Error : EFSMountConnectivityException: The function couldn't connect to the Amazon EFS file system with access point arn:aws:elasticfilesystem:us-east-2: ...
Read more >Invoke Lambda with Step Functions
Step Functions can control certain AWS services directly from the Amazon States Language. For more information about working with AWS Step Functions and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Did you find a solution? I’m trying with Node.js 10.x on AWS and what works locally to login is not working on AWS lambda.
Update: I removed the async keyword from exports.handler = (event) => { line and was able to login.
This is what worked for me. Thanks