{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/801","repository_url":"https://api.github.com/repos/oracle/node-oracledb","labels_url":"https://api.github.com/repos/oracle/node-oracledb/issues/801/labels{/name}","comments_url":"https://api.github.com/repos/oracle/node-oracledb/issues/801/comments","events_url":"https://api.github.com/repos/oracle/node-oracledb/issues/801/events","html_url":"https://github.com/oracle/node-oracledb/issues/801","id":277935854,"number":801,"title":"ORA-12154: TNS:could not resolve the connect identifier specified","user":{"login":"scrapex","id":16551737,"avatar_url":"https://avatars1.githubusercontent.com/u/16551737?v=4","gravatar_id":"","url":"https://api.github.com/users/scrapex","html_url":"https://github.com/scrapex","followers_url":"https://api.github.com/users/scrapex/followers","following_url":"https://api.github.com/users/scrapex/following{/other_user}","gists_url":"https://api.github.com/users/scrapex/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapex/subscriptions","organizations_url":"https://api.github.com/users/scrapex/orgs","repos_url":"https://api.github.com/users/scrapex/repos","events_url":"https://api.github.com/users/scrapex/events{/privacy}","received_events_url":"https://api.github.com/users/scrapex/received_events","type":"User","site_admin":false},"labels":[{"id":161714391,"url":"https://api.github.com/repos/oracle/node-oracledb/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-11-29T22:48:18Z","updated_at":"2017-11-30T15:44:42Z","closed_at":null,"author_association":"NONE","body":"I keep getting the following error when running the lambda in aws \"ORA-12154: TNS:could not resolve the connect identifier specified\". The connection works fine when I try running on my local windows machine or even in an EC2 instance. The issue only happens when deploying on lambda.\r\n\r\nI am running Nodejs 6.10.3 and have included all the necessary libraries. There seems to be an issue with the connection string but it works fine else where.\r\n\r\nHere is the additional information \r\nThe AWS lambda version of Node is 6.10.3\r\nNode-oracledb version is 1.13.1\r\nInstant Client 12.1\r\ngcc version  4.8.3 20140911 \r\nEnvironmental variables set (HOSTALIASES ->  /tmp/HOSTALIASES)\r\nAll the *.so files are underl \"lib\" folder in the zip file uploaded to lambda. \r\n\r\n`exports.handler = function(event, context, callback) {\r\nconsole.log('event:', event);\r\nconsole.log('context:', context);\r\ntry {\r\noracledb = require('oracledb-for-lambda');\r\nconsole.log('oracledb: supported');\r\n\r\n  var conn = {\r\n\t  user: \"my user\",\r\n\t  password: \"my password\",\r\n\t  connectString: \"DOMAIN:PORT/DATABASE\",\r\n\t  externalAuth: false\r\n\t};\r\n\r\n  oracledb.getConnection(conn, (err, connection) => {\r\n\tif (err) {\r\n\t  console.log(\"connection ERROR..\"); ->> CODE FAILS HERE\r\n\t  console.error(err.message);\r\n\t  return;\r\n\t}\r\n\tconsole.log(\"connection successful..\");\r\n  });\r\n\t\r\n\r\n} catch (e) {\r\n    console.log('Failed to load oracledb:');\r\n    console.log(e);\r\n    callback('Failed to load oracledb');\r\n}\r\n\r\nif (oracledb != null) {\r\n    callback(null, 'Oracle DB is supported');\r\n} else {\r\n    callback('Did not actually expect to see this, `require(\\'oracledb\\')` will fail');\r\n}\r\n};`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/oracle/node-oracledb/issues/comments/348227470","html_url":"https://github.com/oracle/node-oracledb/issues/801#issuecomment-348227470","issue_url":"https://api.github.com/repos/oracle/node-oracledb/issues/801","id":348227470,"user":{"login":"scrapex","id":16551737,"avatar_url":"https://avatars1.githubusercontent.com/u/16551737?v=4","gravatar_id":"","url":"https://api.github.com/users/scrapex","html_url":"https://github.com/scrapex","followers_url":"https://api.github.com/users/scrapex/followers","following_url":"https://api.github.com/users/scrapex/following{/other_user}","gists_url":"https://api.github.com/users/scrapex/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapex/subscriptions","organizations_url":"https://api.github.com/users/scrapex/orgs","repos_url":"https://api.github.com/users/scrapex/repos","events_url":"https://api.github.com/users/scrapex/events{/privacy}","received_events_url":"https://api.github.com/users/scrapex/received_events","type":"User","site_admin":false},"created_at":"2017-11-30T15:44:42Z","updated_at":"2017-11-30T15:44:42Z","author_association":"NONE","body":"@dmcghan I was able to figure out the issue. there was a configuration issue in the  lambda. I did not set up the VPC and subnets correctly therefore the connection issue to the database. Thanks for pointing to the right direction. "}}
{"actor":{"display_login":"scrapex"}}