Staticman: Add support for Amazon Lambda Function service

Created on 29 Sep 2016  路  8Comments  路  Source: eduardoboucas/staticman

With Amazon Lambda you don't need a server to run staticman.

help wanted

Most helpful comment

Any progress/further interest on this?

All 8 comments

Thanks, but this issue as it is doesn't really provide any information I can use. If you can elaborate on the advantages of the solution you're proposing and suggested approaches for implementation, feel free to reopen.

@eduardoboucas I think what @zburgermeiszter meant was to allow staticman to use Amazon Lambda to manage comments. Something similar to https://github.com/jimpick/lambda-comments

@DirtyF thanks for that! I'm not very familiar with server-less environments, if I'm honest, so I'm not quite sure what something like that could bring to the project.

As my time capacity is limited at the moment, I'll stick to maintaining the service as it is, but I'm more than happy to discuss alternative implementations if anyone has the chance to help.

The biggest benefit of using Amazon Lambda is when someone don't want to use your servers, they don't need to pay for a whole server just to handle a few requests.

I did some research.

jekyll-aws-comments does exactly what I'm talking about, but that's a bit less advanced than Staticman.

The biggest challenge is to transform the Lambda event to a format that this Express application can understand.

AWS Compute Blog - Going Serverless: Migrating an Express Application to Amazon API Gateway and AWS Lambda
This explains an alternative that can be used.

I have created some hacky proof-of-concept code for this issue.

The biggest difference in processing is that the data should be sent as JSON instead of form data and the branch details are also included in the JSON.

The "handlePR" and "connect" also needs doing.

It is a bit time-consuming to deploy it manually, but it is possible to deploy it via the AWS api.

I suggest to reopen this issue to keep in front of people. I hope someone comes who has more deep knowledge about node.js and Lambda deployments and contribute to it.

Cool, thanks for putting that together!

The fact that data needs to be sent as JSON and not form data is an issue, since most people will be submitting their forms directly to the Staticman API and not necessarily via Ajax.

In any case, I've reopened the issue and I'm open to see where this goes.

Closing this due to inactivity. Happy to reopen in the future.

Any progress/further interest on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fernandoportelab picture fernandoportelab  路  3Comments

clairity picture clairity  路  12Comments

donaldboulton picture donaldboulton  路  9Comments

tichter picture tichter  路  13Comments

mmistakes picture mmistakes  路  8Comments