Comments (8)
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.
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.
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.
@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.
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.
@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.
@LorenzoBoccaccia cloudflare or cloudfront, if we are sticking with Amazon services?
from serverless.
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.
@jhairau Absolutely 👍
from serverless.
Related Issues (20)
- Xray Tracing for SNS and SQS in Serverless framework
- Function URLs get deleted (or won't get created) when provisioned capacity is set on Lambdas for AWS
- Serverless `support` command doesn't support multiple orgs or read the org in serverless.yml
- Compose CLI Command Schema HOT 2
- Advanced Lambda Logging - Undo Uppercase in YAML
- Deployment Failure with Python 3.12.2 HOT 2
- Can no longer reference layer in same service as function
- Implement Exponential Backoff Strategy for AWS API Deployment Rate Limits HOT 5
- Serverless support command occasionally includes the wrong command in report HOT 1
- Template generation produces incorrect template when Policies are specified using an intrinsic.
- `Fn::ForEach` Supported but an error is thrown on the CLI
- Node minimum version requirements? HOT 7
- Lambda invokeMode as RESPONSE_STREAM is not set in deployment
- Add support for docker build --cache-to / remote registry caching
- Unable to build v4 for testing HOT 1
- Error: Cannot find module 'node:events' HOT 3
- dependency [email protected] is vulnerabilty HOT 1
- Missing support for Ruby 3.3 runtime
- Add support for Dockerfile --secret
- Breaking Change in NodeJS 20.12.2 (Error: spawn EINVAL) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless.