awslabs / aws-crt-nodejs

NodeJS bindings for the AWS Common Runtime.
Apache License 2.0
40 stars 27 forks source link

Browser support for SigV4A #348

Closed Hasan-Jawaheri closed 2 years ago

Hasan-Jawaheri commented 2 years ago

Hello,

I have a React application targeting browsers and I'm trying to use this part of the AWS SDK: https://github.com/aws/aws-sdk-js-v3/tree/main/packages/signature-v4-crt (AWS SigV4A signing). That AWS SDK library doesn't work because it is assuming the native version of this package and using a bunch of exported things that are not exported in the browser dist.

A lot of this package seems to be missing in the browser distribution, the auth.ts file is almost empty: https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/browser/auth.ts compared to the native counterpart: https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/native/auth.ts

I don't know what else is missing, but is the intention that the browser and native distributions both end up with the same interface? Is this a WIP, or am I trying to do something that cannot be supported? Do I have any other options to use SigV4A signing in the browser?

bretambrose commented 2 years ago

There's no current work in progress for supporting sigv4a in the browser. It is of course possible, but there would need to be a significant business impetus to get the ball rolling.