AWS: Add command for setting credentials profile

This commit is contained in:
Jermolene
2019-03-22 09:20:25 +00:00
parent 9f0d726f7d
commit fffd0ee9e1
2 changed files with 19 additions and 0 deletions

View File

@@ -42,6 +42,15 @@ Command.prototype.execute = function() {
Command.prototype.subCommands = {};
// Set credentials profile
Command.prototype.subCommands["profile"] = function() {
var AWS = require("aws-sdk"),
profile = this.params[1],
credentials = new AWS.SharedIniFileCredentials({profile: profile});
AWS.config.update({credentials: credentials});
this.callback(null);
};
// Load tiddlers from files in an S3 bucket
Command.prototype.subCommands["s3-load"] = function() {
var self = this,