mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
cmd new: add missing params to util function
This commit is contained in:
parent
40b3464350
commit
6c27d00dff
@ -13,11 +13,12 @@ var JawsError = require('../jaws-error'),
|
||||
|
||||
Promise.promisifyAll(fs);
|
||||
|
||||
|
||||
var cwLogs = new AWS.CloudWatchLogs({
|
||||
apiVersion: '2014-03-28',
|
||||
accessKeyId:,
|
||||
secretAccessKeyId:,
|
||||
endpoint:,
|
||||
//accessKeyId:,
|
||||
//secretAccessKeyId:,
|
||||
//endpoint:,
|
||||
});
|
||||
|
||||
|
||||
@ -27,7 +28,7 @@ var cwLogs = new AWS.CloudWatchLogs({
|
||||
|
||||
// Fetch log streams from AWS CloudWatch
|
||||
function _fetchLogStreams(lambdaFunctionName) {
|
||||
return new Promise(resolve, reject) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
||||
var params = {
|
||||
logGroupName: 'aws/lambda/' + lambdaFunctionName,
|
||||
@ -40,12 +41,12 @@ function _fetchLogStreams(lambdaFunctionName) {
|
||||
if (error) return reject(error);
|
||||
else return resolve(data);
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Fetch log stream events from AWS CloudWatch
|
||||
function _fetchLogStreamEvents(logGroupName, logStreamName) {
|
||||
return new Promise(resolve, reject) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
||||
var params = {
|
||||
logGroupName: logGroupName,
|
||||
@ -56,7 +57,7 @@ function _fetchLogStreamEvents(logGroupName, logStreamName) {
|
||||
if (error) return reject(error);
|
||||
else return resolve(data);
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Check for new log stream events
|
||||
|
||||
@ -163,7 +163,7 @@ module.exports = function(JAWS) {
|
||||
JawsError.errorCodes.MISSING_AWS_CREDS));
|
||||
}
|
||||
|
||||
JAWS._utils.setAwsAdminCreds('default'); //TODO: really want to prompt for region? Manual change in config now
|
||||
JAWS._utils.setAwsAdminCreds('default', answers.awsAdminKeyId, answers.awsAdminSecretKey); //TODO: really want to prompt for region? Manual change in config now
|
||||
project.awsAdminCreds = new AWS.SharedIniFileCredentials({profile: project.awsProfile});
|
||||
}
|
||||
|
||||
|
||||
@ -40,5 +40,8 @@ require('./commands/tag')(JAWS);
|
||||
// Command: custom
|
||||
require('./commands/custom')(JAWS);
|
||||
|
||||
// Command: logs
|
||||
require('./commands/logs')(JAWS);
|
||||
|
||||
// Export
|
||||
module.exports = JAWS;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user