mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
AWS: Add command for setting credentials profile
This commit is contained in:
parent
9f0d726f7d
commit
fffd0ee9e1
@ -9,6 +9,16 @@ Perform operation on Amazon Web Services
|
||||
--aws <sub-command> [<parameter> ...]
|
||||
```
|
||||
|
||||
! "profile" subcommand
|
||||
|
||||
Sets the AWS credentials profile to be used for subsequent commands.
|
||||
|
||||
```
|
||||
--aws profile <profile-name>
|
||||
```
|
||||
|
||||
* ''profile-name'': AWS profile name
|
||||
|
||||
! "s3-load" subcommand
|
||||
|
||||
Load tiddlers from files in an S3 bucket.
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user