Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((msg) => {
/* eslint-disable no-console */
console.log('completed: ', msg);
response.send(event, context, response.SUCCESS, {});
})
.catch(e => {
elasticache.addTagsToResource(params, function (err, data) {
if (err) {
res.Error = 'addTagsToResource call failed';
console.log(res.Error + ':\\n', err);
response.send(event, context, response.FAILED, res);
} else {
console.log("ElastiCache instances successfully tagged");
response.send(event, context, response.SUCCESS, res);
}
});
};
], function (error) {
if (error) {
console.log('ERROR: ' + error);
response.send(event, context, response.FAILED, res);
} else {
response.send(event, context, response.SUCCESS, res);
}
});
elasticache.addTagsToResource(params, function (err, data) {
if (err) {
res.Error = 'addTagsToResource call failed';
console.log(res.Error + ':\\n', err);
response.send(event, context, response.FAILED, res);
} else {
console.log("ElastiCache instances successfully tagged");
response.send(event, context, response.SUCCESS, res);
}
});
};
var errorExit = function (message, event, context) {
var res = {Error: message};
console.log(res.Error);
response.send(event, context, response.FAILED, res);
};
], function (error) {
if (error) {
console.log('ERROR: ' + error);
response.send(event, context, response.FAILED, res);
} else {
response.send(event, context, response.SUCCESS, res);
}
});
function failed(err) {
console.log('FAILED:\n', err);
return response.send(event, context, response.FAILED, err, physicalId);
}
function failed(err) {
console.log('FAILED:\n', err);
return response.send(event, context, response.FAILED, err, physicalId);
}
function failed(err) {
console.log('FAILED:\n', err);
return response.send(event, context, response.FAILED, err, physicalId);
}
function failed(err) {
console.log('FAILED:\n', err);
return response.send(event, context, response.FAILED, err, physicalId);
}