-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
From Discord: AWS Lambda environment fail with .toWebHandler
#3129
Comments
effect-http
Similar to hono
.toWebHandler
when using SST Ion and calling |
Well, calling it a platform bug is quite a stretch given it's AWS that is not spec-compliant. BTW make sure comments are not removed in the build pipeline, otherwise |
@mikearnaldi Ah, I am not the one impacted lol |
cc @tim-smart |
Summary
Summary
The conversation revolves around implementing an AWS Lambda function using
effect-http
, similar to how it's done with thehono
framework. The user aims to create a "fat lambda" that handles all requests. Here's a summary of the key points and takeaways:Initial Inquiry:
effect-http
, similar to thehono
example provided.Community Input:
effect-aws
and@effect/platform
for potential solutions.toWebHandler
function from@effect/platform
was suggested as a possible solution.Code Examples:
HttpApp.toWebHandler
andHttpApp.toWebHandlerLayer
to create the handler.HttpApp.toWebHandlerLayer
for performance reasons was highlighted.Issues Encountered:
addEventListener
and missing files (ENOENT
).Root Cause Analysis:
Request
object missing theAbortController
API support.AbortController
.Potential Solutions:
/* global fetch */
to the start of the file was suggested but deemed insufficient.AbortController
was considered but might not resolve the issue since theRequest
object comes from AWS.Key Takeaways
Compatibility Issues:
AbortController
andAbortSignal
.Performance Considerations:
HttpApp.toWebHandlerLayer
to avoid performance issues related to reading files from disk on every request.Error Handling:
Community Support:
effect-http
project is community-driven, and solutions may require collaboration and experimentation.Documentation and Examples:
effect-http
with AWS Lambda, indicating a need for more community contributions and shared knowledge.By addressing these key points, the user can better navigate the challenges of implementing
effect-http
with AWS Lambda and potentially contribute to the community's knowledge base.Discord thread
https://discord.com/channels/795981131316985866/1256526365008728097
The text was updated successfully, but these errors were encountered: