Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var net = require("net")
- exports.handler = function(event, context) {
- net.connect({
- port: 5439,
- host: '10.116.6.32'
- },
- function(err,data) {
- if (err) {
- console.log("site1 socket failure");
- context.fail();
- } else {
- console.log("site1 socket success");
- net.connect({
- port: 5439,
- host: 'analytics.cqwnz0mozlxa.us-west-2.redshift.amazonaws.com'
- },
- function (err,data) {
- if (err) {
- console.log("site1 dns failure");
- context.fail();
- } else {
- console.log("site1 dns success");
- context.succeed();
- }
- })
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement