Skip to main content

LambdaBase

A library to support development of enterprise Serverless applications.

Serverless computing allows you to build and run applications without expending time and effort managing a server. Code is executed and billed only when called. Whilst this model provides many advantages such as horizontal scalability and reduced operational costs it creates it's own set of drawbacks such as debugging, testing and packaging.

There are numerous articles detailing the advantages and disadvantages of serverless architectures. It's worth considering all the salient points before starting down the serverless path however, in general, the zero configuration horizontal scalability and cost efficiencies are the most significant driving factors. The architecture described here helps to mitigate the disadvantages whilst magnifying the advantages.

As with any architecture there is no one size fits all solution, however, I've seen the following pattern implemented successfully in both Java and Python across multiple domains. I believe it provides a reasonable amount of flexibility whilst being sufficiently structured to help developers rapidly implement clean code. One of the guiding principles of this pattern is to overcome one of the most significant issues with Serverless - the difficulty of debugging and testing Serverless ready code in a local environment.

The key design points and the basis for this architecture are as follows:

  • Lambdas are grouped into functional areas. Each group contains multiple lambdas with different handlers for each function. This is to allow related lambdas to share common ode more easily and to simplify packaging and application structure.
  • It should always be possible to execute and debug the lambda code locally.
  • The configuration for each environment is packaged with each lambda. Which configuration file to use is specified by an environment variable which is specified at deployment time.
  • The code to package and deploy each of the lambdas lives with the runtime code
  • One click deployment to new environments should be trivial, and the concept of infrastructure as code should be maintained at all times.
  • Dependency injection is used to allow alternative services to be injected into lambdas depending on where they are running.

The proposed architecture is designed to fulfill these high level goals whilst maintaining a flexibility which should allow future extension and resilience to changing project requirements.

Push to PyPi:

python setup.py bdist_wheel python -m twine upload lambdabase-0.x-py2-none-any.whl

Metadata

Release files for lambdabase 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lambdabase 0.6
File Size Uploaded
lambdabase-0.6.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lambdabase 0.6
File Interpreter ABI Platform
lambdabase-0.6-py2-none-any.whl Python 2 none any Details

Total release size: 41.0 kB

Release files / lambdabase-0.6.tar.gz

Download URL lambdabase-0.6.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dc628dcc47194a9193ea4976e8f05959b0242896cc84fd64eea5e50a8f58a9d2
BLAKE2b-256 checksum
How to use checksums
9c16d67922e73c85acf6ce9be0957dc09ae7cee84c98d3bb7e1b252ce41eafcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release files / lambdabase-0.6-py2-none-any.whl

Download URL lambdabase-0.6-py2-none-any.whl
Size 25.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
cb629ab5b8a6b022e436536cba1f0f1a1bdda596d370a2fc6f1f319f7f490a0d
BLAKE2b-256 checksum
How to use checksums
93f5e10e72f7fd5983b5bde825c302675eca579f27f6ed69c5f6db90233c77cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

Release history Release notifications | RSS feed

0.7

1 release file

This release

0.6 This release

2 release files

0.5

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page