Closed paul-uz closed 1 month ago
Looks like the package is missing https://github.com/awslabs/llrt/blob/main/build.mjs#L109-L143.
Can it be added please, as its blocking my progress.
Hmm, so the deeper issue, and related to https://github.com/awslabs/llrt/issues/518 somewhat, is that http
and https
are not supported. What can I do in this situation? Do I have no choice but to abandon LLRT for these functions, and use LLRT for more "basic" functions that only deal with things like dynamodb?
Http is present, but there might be a bug.
The http
and https
modules are not yet supported. Unfortunately, the http
present in LLRT is just a directory name and does not function as a Node.js module name.
See also: https://github.com/awslabs/llrt/issues/40
Right, it seems missing but the primitives are there so it is probability just a matter of creating the module. Still waiting on a few things before moving it to llrt_modules
Right, it seems missing but the primitives are there so it is probability just a matter of creating the module. Still waiting on a few things before moving it to llrt_modules
Do you have a rough ETA?
I am only helping on this repository @richarddavison can answer that
any updates?
Hi @paul-uz sorry for late reply. We do not support the @smithy/node-http-handler since it's a pure node dependency. If you bundle for browser, your bundler should automatically use the fetch-http-handler. Can you give me some more context on what you're trying to do and I'll take a look!
Trying to bundle functions that use the smithy http handler and it's simply not working due to the lack of http module.
Docs state smithy packages are covered but then you've just said they aren't.
I'll be honest, the documentation is pretty poor. I know this is early stages but the LLRT was recommended to us personally by someone at AWS but it's clearly not ready for usage yet.
Trying to bundle functions that use the smithy http handler and it's simply not working due to the lack of http module.
Smithy has many http handlers and @smithy/node-http-handler
is built for Node.js and won't work out of the box. This is a low level component that can be replaced by @smithy/fetch-http-handler
. All SDKs are agnostic to the http handler.
Docs state smithy packages are covered but then you've just said they aren't.
Unfortunately not every @smithy
package since some of them depend on Node.js APIs.
I'll be honest, the documentation is pretty poor. I know this is early stages but the LLRT was recommended to us personally by someone at AWS but it's clearly not ready for usage yet.
We agree that documentation could be improved, there are a couple of gotchas when it comes to bundling, especially related to SDKs not bundled with the runtime. We are working on making this better. I'm sorry that your experience with LLRT is not living up to your expectations, we are constantly adding new capabilities and APIs to make the transition smoother. What SDK are you using that's not supported? Have you tried the -full-sdk.zip
packages?
Would be great if you can provide some additional details or maybe a code sample? :)
I've mentioned which parts I'm having issues with, namely the credential provider.
It'd be good to get some well documented examples of some different Lambdas using different AWS SDKs.
Smithy has many http handlers and @smithy/node-http-handler is built for Node.js and won't work out of the box. This is a low level component that can be replaced by @smithy/fetch-http-handler. All SDKs are agnostic to the http handler.
Unfortunately, I wouldn't even know how to go about "replacing" the handler. In all honesty, if something doesn't work out of the box, I'm not going to invest much time in it.
The LLRT really piques my interest, so I want it to work. But it needs to be easier to port fucntions across.
Readme states
@smithy
packages are included, but I'm seeing an error trying to import@smithy/node-http-handler