hakopako

Full-stack Engineer's blog

Lambda with sqlite makes serverless and databaseless

日本語 | English

Foreword

AWS Lambda provides us serverless computing platform so that you can run code by uploading them without pouring time for building servers. This time, I tried not only serverless but also NO AWS DB services such as RDS and DynamoDB and ElasticCache.

Let's try

Things are simple. Just compress sqlite file with your code, and upload it. (zip/jar)
What I am saying is compressing these 3 files together.

  • your code
  • libraries to access sqlite
  • sqlite file

 

\ WORKS PRETTY GOOD /

 

However, there are some regulations like so.

  • zip/jar file must be lower than 50MB.
  • you can select memory value but the upper limit is 1GB.

see: AWS Lambda Limits - AWS Lambda

Conclusion

Obviously, this is for reference access but has some potential.
As far as I tried, even tuning memory value, it seems that response is somewhat slow.
So if you are strict about speed, this wouldn't be the best solution.

Thanks.