class AWSSignerV4
implements Signer
import { AWSSignerV4 } from "https://dotland.deno.dev/x/aws_api@v0.5.0/client/signing.ts";
This class can be used to create AWS Signature V4 for low-level AWS REST APIs. You can either provide credentials for this API using the options in the constructor, or let them be aquired automatically through environment variables.
Example usage:
const signer = new AWSSignerV4();
const body = new TextEncoder().encode("Hello World!")
const request = new Request("https://test-bucket.s3.amazonaws.com/test", {
method: "PUT",
headers: { "content-length": body.length.toString() },
body,
});
const req = await signer.sign("s3", request);
const response = await fetch(req);
Constructors
new
AWSSignerV4(region: string, credentials: Credentials)Properties
private
credentials: Credentials