aws-s3-sign

CORS upload signature for Amazon S3

Usage no npm install needed!

<script type="module">
  import awsS3Sign from 'https://cdn.skypack.dev/aws-s3-sign';
</script>

README

aws-s3-sign


Generates a policy and signature for posting files via CORS to Amazon S3.

Install

npm i --save aws-s3-sign

Usage

var sign = require('aws-s3-sign');

var s3Signature = sign({
  awsSecret:'MY_AWS_SECRET_KEY',
  bucket:'my-bucket',
  acl:'private',
  key:'path/to/key.txt',
  expire: 300, //seconds till expire
  contentType:'text/plain'
});

console.log(s3Signature);