Open sam-goodwin opened 1 year ago
Thanks to @krivachy for the suggestion of https://www.npmjs.com/package/aws4. Also found https://github.com/mhart/aws4fetch which works with Fetch API. I wonder if we can/should support both?
Bundle impact:
aws4
aws4fetch
I think this approach would work better for browser environments but maybe worse for Lambda since the @aws-sdk/* libraries are included in the Lambda bundle. Still worth testing though, especially since importing @aws-sdk has proven to be slow.
@aws-sdk/*
Thanks to @krivachy for the suggestion of https://www.npmjs.com/package/aws4. Also found https://github.com/mhart/aws4fetch which works with Fetch API. I wonder if we can/should support both?
Bundle impact:
aws4
(8kB min, 2.9kB min + gzip) - https://bundlephobia.com/package/aws4@1.12.0aws4fetch
(7.2kB min, 2.9kB min + gzip) - https://bundlephobia.com/package/aws4fetch@1.0.17I think this approach would work better for browser environments but maybe worse for Lambda since the
@aws-sdk/*
libraries are included in the Lambda bundle. Still worth testing though, especially since importing @aws-sdk has proven to be slow.