Lambda Deploy #4678
Replies: 10 comments 18 replies
-
I've tried it in several ways with no success. |
Beta Was this translation helpful? Give feedback.
-
I’m in a similar situation. I want to bring in Remix to our stack, which in terms of frontend apps is currently PWA hosted in S3 and our company is going to be staying AWS for quite a long time. I personally need a bit of hand holding around how to use edge computing in AWS, and would rather not need to briing in yet another dependency (Architect) if I can help it. I see there is something called lambda@edge - would this be the correct thing to look into? https://aws.amazon.com/lambda/edge/ Or are the simple Cloudfront Functions the way to go? https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions.html |
Beta Was this translation helpful? Give feedback.
-
I'm trying to run the application on a simple lambda for now. |
Beta Was this translation helpful? Give feedback.
-
I have been wanting to achieve the same thing without adding another dependency like Architect. We use a Kubernetes (deployed using Terraform) based setup which provides us some options:
We work with Python on the server and have PWAs at the moment, which I am looking to replace with remix based apps |
Beta Was this translation helpful? Give feedback.
-
Hi guys, did someone tried to use custom lambda container image for this? @rbgfloripa @devraj You can deploy lambda as docker image with some limitations. https://docs.aws.amazon.com/lambda/latest/dg/images-create.html |
Beta Was this translation helpful? Give feedback.
-
here is exampe: but not full architect package you can inspire how createRequestHandler looks like and migrate it to your codebase |
Beta Was this translation helpful? Give feedback.
-
Opening this discussion back up. I'm deploying a remix app on lambda, but I'm going through express first
..more code
None of my actions work and my loaders are broken for some reason. does anyone know if this setup will actually work ? I think the conversion for the request isn't functioning ? I'm getting this error for some routes SyntaxError: The string did not match the expected pattern. |
Beta Was this translation helpful? Give feedback.
-
https://serverlessup.com/ramblings/remix-&-cdk-fun-08-11-2022 This post can be helpful (not mine). It describes deployment to CloudFront->APIGW->Lambda with CDK. Personally I don't understand what Remix has to do with some Architect and why it is even being discussed. I never heard of it before nor after except in context of Remix. Is it some "partner project" or what, I don't understand. The lack of attention from Remix team to AWS deployment upsets me. |
Beta Was this translation helpful? Give feedback.
-
I published a repository to demonstrate deploying to AWS Lambda using CDK, based on the solution I described in a different Discussion. It has some similarities to @vsnig's solution above but has a simpler architecture. |
Beta Was this translation helpful? Give feedback.
-
Thank you @gotgenes for sharing your solution! I studied it and learned a lot about how CDK projects can be organized. This alternative approach is working well for me in Lambda: const serverlessExpress = require("@codegenie/serverless-express");
const express = require("express");
const { createRequestHandler } = require("@remix-run/express");
const app = express();
let build;
exports.handler = async (event, context) => {
if (!build) {
build = await import("./build/server/index.js");
}
app.all("*", createRequestHandler({ build }));
return serverlessExpress({ app })(event, context);
}; I tried with Architect but that seemed too heavyweight, and actually made |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Is there any way to deploy the application in an aws lambda WITHOUT Architect?
Because my deployment process is completely separate and automated. I don't have access to the AWS account.
I think I would have to generate a ZIP file of the application to run in a lambda or something like this.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions