aws-sdk-light

A lightweight version of the AWS SDK that has minimal external dependencies and runs on systems with limited resources

Usage no npm install needed!

<script type="module">
  import awsSdkLight from 'https://cdn.skypack.dev/aws-sdk-light';
</script>

README

AWS SDK Light

npm

This package is primarily focused at enabling Apigee users to integrate with AWS services directly from a JavaScript Policy. However it can certainly be used by anyone.

Although there are already many great libraries that allow integration into AWS services (including the actual aws-sdk!) I found that the situation I was in did not allow me to use them :sob: :rage:.

Key things about why I made this:

Installation

Available on npm

npm install aws-sdk-light

Overview

Importing

// import entire SDK
var awsSdkLight = require('aws-sdk-light');

// import single module
var awsSdkLight = require('aws-sdk-light/clients/lambda');

Usage

var awsSdkLight = require('aws-sdk-light');

var options = {
  accessKeyId: '<value>',
  secretAccessKey: '<value>',
  region: '<value>'
};
var lambda = new awsSdkLight.Lambda(options);

var params = {
  FunctionName: 'hello-world',
  Payload: <string>
};
lambda.invoke(params, function(err, data) {
  if (err) {
    console.log(err);
  } else {
    console.log(data)
  }
});

Documentation