Socket
Socket
Sign inDemoInstall

node-red-contrib-aws-sdk

Package Overview
Dependencies
37
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-red-contrib-aws-sdk

The aws sdk wrapper node which allows you to execute aws functions in javascript block.


Version published
Maintainers
1
Install size
85.9 MB
Created

Readme

Source

node-red-contrib-aws-sdk

A function block where you can write your own code to execute aws-sdk nodejs library.

npm version

Example of using aws-sdk inside this function block:

// Create a bucket using bound parameters and put something in it.
// Make sure to change the bucket name from "myBucket" to something unique.
var s3bucket = new AWS.S3({params: {Bucket: 'myBucket'}});
s3bucket.createBucket(function() {
  var params = {Key: 'myKey', Body: 'Hello!'};
  s3bucket.upload(params, function(err, data) {
    if (err) {
      console.log("Error uploading data: ", err);
      msg.payload = err;
      callback(msg);
    } else {
      console.log("Successfully uploaded data to myBucket/myKey");
      msg.payload = data;
      callback(msg);
    }
  });
});

This node exposes the AWS object that is created by require('aws-sdk') into the function context. In order to process the asynchronous operation, a callback(msg) function must call to send the msg context to the next node.

Reference: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-examples.html

Keywords

FAQs

Last updated on 02 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc