Deploy to AWS Lambda?

Hi Everyone,

Thanks for working on such a great project!

I’m wondering if anyone has had experience deploying into AWS via Lambda? This project is a lot of firsts for me (first react project and first serverless project) so I’m a bit lost. I have a theme I’ve built all ready to go and ran npx frontity build to create the server.js and static files. I have the static files hosted up in my CDN with Cloudfront, and have pointed server.js to those files and it all seems to work fine locally by running npx frontity serve.

Creating a Lambda function to run this deployment is another first for me. I get the idea that creating a node.js function in Lambda and then pointing an API gateway endpoint to it for calling it via http but getting it to execute server.js has me stumped. A handler function which then calls and executes server.js probably is all I need but I’m not 100% on where to go from here.

I know the project seems to focus more in deploying to Now and even some people working on Netlify, but has anyone taken a look running frontity on AWS Lambda? Any thoughts or being pointed in a specific direction to get going would be appreciated.

If I get a project successfully deployed I’ll happily contribute with some steps for others to work from.

Thanks!

Hi @phoebus!

First of all, welcome to the community, it’s great to see that you have decided to take over this quest :blush:

I’ve been taking a look to our roadmap (is not public yet, we are working to publish it in the next weeks) and support for AWS-Lambdas is scheduled. We are right now working on the roadmap in order to publish it during the next weeks, so it will be easier for everybody to see what are we working on.

I’ve also found this thread Deploy to Netlify where they mention an approach to deploy on lambdas.

By the way, we would love to know what kind of project are you working on. Can you tell us a bit about what you are building?

1 Like

Thanks I’ll check out the thread and anticipate the soon to come info. In the meanwhile if I figure out anything on my own I’ll come back and post about it.

My project is a simple revamp of my personal blog, I always hated how Wordpress themes work and once I learned about headless CMS I knew that was the way to go. I also wanted to learn React after several years of not doing any development. The React components that the themes are built on seem to be very easy to adapt and understand for a first time React user so that went great. I found it was very easy to mix up my own components with the Mars and Twenty Nineteen themes to make it unique to my situation.

1 Like

That sounds great :blush:

Glad to hear this as well!

As soon as you have something to show, we would love to take see your project live! In addition, @Reyes is actively looking for showcases for the newsletter.

1 Like

@phoebus if you are still interested in testing AWS Lambdas let me know and I’ll add the handler to our server.

It’s something that’s been on our roadmap for a while but we didn’t do it due to a lack of time. If you are willing to help us testing it out, I’ll add the handler right away :slight_smile: