Code Monkey home page Code Monkey logo

Comments (8)

adamburmister avatar adamburmister commented on May 22, 2024

I'll take a stab at answering this:

When configuring your AWS API Gateway service you can configure a given endpoint to act as an HTTP Proxy.

image 2015-08-05 at 1 10 10 pm

This would allow you to direct a request to an S3 hosted file, for instance.

So... there is an architecture that would allow for this to happen easily, but I am not aware if such functionality has been implemented in this project or if it's planned.

from serverless.

adamburmister avatar adamburmister commented on May 22, 2024

Sorry, I realise I misread your question: You don't want to serve S3 files because of pricing.

I honestly wouldn't worry. It's fractions of cents to serve from S3.

As an aside to the original answer: @ac360 is S3 serving already implemented?

from serverless.

ac360 avatar ac360 commented on May 22, 2024

@LorenzoBoccaccia I haven't done any tests. But, I'd love to see some! If the tests reveal it's more economical, then this approach could be a big deal. Further, this could lead to easier, faster deployments.

To me, it comes down to the Lambda cold start issue. If you have a Lambda with a low memory size, it's slow to start up. If you up the memory size, the Lambda's CPU is also upgraded and it starts up faster, but then you increase the cost and then I'm not sure if it's still competitive with S3/Cloudfront/other options.

I'd lower the Lambda memory to the lowest possible setting. Make sure you have NO dependencies and as little code as possible and perform some tests. Make sure to wait over ~10 minutes in between some of the tests because that length of time will de-prioritize the Lambda function on AWS's infrastructure and it will have to cold start-up.

Next, I'm not sure how you would achieve fast speeds around the globe with this approach since Lambda is not yet available in all AWS regions (though, it's coming, I'm sure).

Anyway, I'm still trying to implement basic features within JAWS. If you or anyone else tests this out and the results look favorable/competitive, then we have some serious head-scratching to do.

@adamburmister S3 serving in JAWS is lacking right now. Currently, JAWS includes only a local development server, and some static asset boilerplate files for your website. There are lots of tools to help you get static assets onto S3. I'm currently surveying all of them so that I can incorporate the best for JAWS. Any suggestions?

from serverless.

LorenzoBoccaccia avatar LorenzoBoccaccia commented on May 22, 2024

thanks for the reply. I'll have a look.

latency wise for cheapness sake I'd go to cloudflare - that should solve worldwide latency (but not spinup issues, albeit it can masquerade them for long enough)

from serverless.

ac360 avatar ac360 commented on May 22, 2024

@LorenzoBoccaccia I like this a lot. But the issue I see is the same in issue #13 -- API Gateway is designed to work primarily with JSON and it can't return anything else. I think it's time to head to the AWS developer forums and start requesting API Gateway return binary data.

from serverless.

arieljake avatar arieljake commented on May 22, 2024

@LorenzoBoccaccia cloudflare or cloudfront, if we are sticking with Amazon services?

from serverless.

jhairau avatar jhairau commented on May 22, 2024

Both options for caching static assets please.
On Sat, Aug 8, 2015 at 11:57 AM, Ariel Jakobovits [email protected]
wrote:

@LorenzoBoccaccia https://github.com/LorenzoBoccaccia cloudflare or
cloudfront, if we are sticking with Amazon services?


Reply to this email directly or view it on GitHub
#15 (comment).

from serverless.

ac360 avatar ac360 commented on May 22, 2024

@jhairau Absolutely 👍

from serverless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.