Examples and getting started guides

Hi everybody,

Several folks expressed a desire to see more examples and getting started guides for AWS Lambda Runtime library.

There are many potential users and use cases for Lambda, to name a few:

  • iOS/macOS application developers with no server experience that want to extend their applications into the cloud.
  • Experienced Swift on Server developers that want to add event driven components to their systems.
  • Server developers with no Swift experience that want to try Swift on Server.

This wide range of potential users and user cases make it difficult to decide on what we should focus first, and we would like to hear your feedback on that question. :eyes:

Additionally, several community members (@adam-fowler, @Andrea-Scuderi @fabianfett and @tachyonics to name a few) stepped up to write guides and add examples. Right now, these guides and examples are spread between the project's readme, personal blogs and repos, and the project's "Examples" directory. To make these more discoverable, we would like to suggest the following:

  1. Readme stays focus with minimal examples.
  2. The "Examples" directory limited to examples that do not introduce additional dependencies. Its important to keep the examples build time manageable and stable as they are part of the project's CI tests
  3. Elaborate guides and examples to be managed in separate repos and personal blogs, and linked to from a new "Resources" (name tbd) section at the top part of the readme.

What do folks think? :eyes:

3 Likes

I agree on the points 1 and 2, the lambda runtime repo should be easy to maintain.
On point 3, in addition to your proposal, we could also consider having an official common repo in which we can share working examples.
As you know I started with a Swift Lambda Runtime library called swift-sprinter in September last year and I separated the Examples from the package containing the runtime. In that repo I also added tests for each example so when swift updates the version or a package changes I can check that the integration between the example and the runtime still works. I added there integration with aws-sdk-swift, Redis, PostgreSQL. I realised that having a package for each example also helps to freeze the example to a working version. At the moment that repo uses my runtime, but it couldn't be difficult to update it with the official swift-aws-lambda-runtime, maybe it could be an inspiration for a common one.
I think that having good working official examples will speed up the adoption of Swift on server side, but having a common repo with Examples it will also help the third party SDKs developers to share common standards and best practices.

Tom, this all sounds good to me. On point two It is probably worthwhile having some internal CI that runs with the various libraries that would be common to swift-aws-lamba-runtime. I know swift-nio do this to ensure they aren't breaking anything downstream.

Given we will already have links to examples/guides at the top of repo I'm not sure we need an official repo with the more complex examples. I believe there is more flexibility in what can be included in a list of examples/guides at the top of a readme then in an official repo where everything has to be officially sanctioned. Anyway who is going to be responsible for this code? It's not fair on Tom to expect him to look after everybody elses code.

2 Likes