Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@smithy/node-http-handler not included #516

Open
paul-uz opened this issue Aug 1, 2024 · 12 comments
Open

@smithy/node-http-handler not included #516

paul-uz opened this issue Aug 1, 2024 · 12 comments

Comments

@paul-uz
Copy link

paul-uz commented Aug 1, 2024

Readme states @smithy packages are included, but I'm seeing an error trying to import @smithy/node-http-handler

@paul-uz
Copy link
Author

paul-uz commented Aug 1, 2024

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.

@paul-uz
Copy link
Author

paul-uz commented Aug 1, 2024

Hmm, so the deeper issue, and related to #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?

@Sytten
Copy link
Contributor

Sytten commented Aug 1, 2024

Http is present, but there might be a bug.

@nabetti1720
Copy link
Contributor

nabetti1720 commented Aug 1, 2024

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: #40

@Sytten
Copy link
Contributor

Sytten commented Aug 2, 2024

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

@paul-uz
Copy link
Author

paul-uz commented Aug 2, 2024

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?

@Sytten
Copy link
Contributor

Sytten commented Aug 2, 2024

I am only helping on this repository @richarddavison can answer that

@paul-uz
Copy link
Author

paul-uz commented Sep 11, 2024

any updates?

@richarddavison
Copy link
Contributor

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!

@paul-uz
Copy link
Author

paul-uz commented Sep 20, 2024

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.

@richarddavison
Copy link
Contributor

richarddavison commented Sep 20, 2024

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? :)

@paul-uz
Copy link
Author

paul-uz commented Sep 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants