question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

datasette publish lambda plugin

See original GitHub issue

Refs #217 - create a publish plugin that can deploy to AWS Lambda.

https://docs.aws.amazon.com/lambda/latest/dg/limits.html says lambda packages can be up to 50 MB, so this would only work with smaller databases (the command can check the filesize before attempting to package and deploy it).

Lambdas do get a 512 MB /tmp directory too, so for larger databases the function could start and then download up to 512MB from an S3 bucket - so the plugin could take an optional S3 bucket to write to and know how to upload the .db file there and then have the lambda download it on startup.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jordaneremieffcommented, Feb 9, 2022

Hi @simonw,

I’ve received some inquiries over the last year or so about Datasette and how it might be supported by Mangum. I maintain Mangum which is, as far as I know, the only project that provides support for ASGI applications in AWS Lambda.

If there is anything that I can help with here, please let me know because I think what Datasette provides to the community (even beyond OSS) is noble and worthy of special consideration.

0reactions
simonwcommented, Sep 17, 2021

That’s so useful @sethvincent! Really interesting reading your code there, especially clever how you’re using the base_url config.

I’d be very interested to see what your demo looks like without using serverless - completely agree that the less additional dependencies there are for this the better.

I’m also very interested in figuring out a way to run Datasette in Lambda but with the SQLite database on an EFS volume. Do you have a feel for how hard that would be?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Publishing data - Datasette documentation
... over AWS Lambda to allow for quick, scale-to-zero deployment. You can deploy Datasette instances to Vercel using the datasette-publish-vercel plugin.
Read more >
Simon Willison on Twitter: "Zeit Now v2 is a totally different ...
I think that's down to a dumb design decision by AWS lambda. ... GitHub - simonw/datasette-publish-vercel: Datasette plugin for publishing data using Vercel....
Read more >
Running Datasette on AWS Lambda - Colin Dellow
Running Datasette on AWS Lambda ... For SQLite, there's Datasette. ... I'll package it into a publish plugin for Datasette itself.
Read more >
Arc Note: Datasette - Simon Willison - Architecture Notes
... ASGI: Datasette running on AWS Lambda via Vercel (enabled by the datasette-publish-vercel plugin) exposes the ASGI application directly, ...
Read more >
Ibis-Datasette - Jim Crist-Harif
Tooling for publishing that data on a number of common cloud platforms. It also has a large ecosystem of plugins supporting everything from ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found