Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var out = require('./out.json').Parameters
- var eachLimit = require('async').eachLimit
- var AWS = require("aws-sdk");
- var ssm = new AWS.SSM();
- eachLimit(out, 2, function({Name, Value, Type}, callback) {
- console.log('parm:', Name)
- var params = {Name, Value, Type, Overwrite: true}
- ssm.putParameter(params, function(err, data) {
- if (err) console.log("Error Loading: ", Name, err, err.stack); // an error occurred
- else console.log('Loaded: ', Name)
- callback()
- });
- }, function(err) {
- // if any of the file processing produced an error, err would equal that error
- if( err ) {
- // One of the iterations produced an error.
- // All processing will now stop.
- console.log('A file failed to process');
- } else {
- console.log('All files have been processed successfully');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement