aws-request-signer

Sign the AWS requests

Usage no npm install needed!

<script type="module">
  import awsRequestSigner from 'https://cdn.skypack.dev/aws-request-signer';
</script>

README

Quick start

Install

yarn add aws-request-signer

Add to the project

const Signer = require('aws-request-signer')

Sign the request

const request = new Signer({
        region,
        accessKeyId,
        secretAccessKey
    }, {
        url,
        method,
        dataType: 'json',
        contentType: 'application/x-amz-json-1.0',
        body
    })

Send the request

await fetch('https://' + url.host + url.pathname, request)