The following is the version that is installed in the EC2 linux
Addresses: 172.31.21.168 (int)
Address Family: IPv4
Encryption: Off
OS: x86_64-unknown-linux-gnu
Version: Enterprise Edition 6.6.0 build 7909
We have attached the elastic public IP to the above instance , From the browser we are able to access the couchbase server .
When we try to connect from AWS lambda nodejs - 12.x we are getting the time out error.
The following is the code from nodejs
The couchbase version is 3.0.6
in the below we tried by passing port and with out port too.
const couchbase = require(‘couchbase’);
var cluster = new couchbase.Cluster(‘couchbase://18.135.57.237:8091’, {
username: ‘admin’,
password: ‘@poms2020!’
});
var bucket = cluster.bucket(‘poms’);
var collection = bucket.defaultCollection();
var document1= {“id”:“test”};
//const UUID = require(“uuid”);
var key=‘1’;
try {
const insertResult = await collection.insert(key, document1,
{timeout:10000} // 10 seconds
);
}catch (error) {
console.log("error::",error);
}
Can you please tell us if we doing any thing incorrect?