Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var out = require('./out.json').Parameters
  2. var eachLimit = require('async').eachLimit
  3. var AWS = require("aws-sdk");
  4. var ssm = new AWS.SSM();
  5.  
  6.  
  7.  
  8. eachLimit(out, 2, function({Name, Value, Type}, callback) {
  9. console.log('parm:', Name)
  10.  
  11.  
  12. var params = {Name, Value, Type, Overwrite: true}
  13. ssm.putParameter(params, function(err, data) {
  14. if (err) console.log("Error Loading: ", Name, err, err.stack); // an error occurred
  15. else console.log('Loaded: ', Name)
  16. callback()
  17. });
  18.  
  19. }, function(err) {
  20. // if any of the file processing produced an error, err would equal that error
  21. if( err ) {
  22. // One of the iterations produced an error.
  23. // All processing will now stop.
  24. console.log('A file failed to process');
  25. } else {
  26. console.log('All files have been processed successfully');
  27. }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement