motivation: define stable API in preperation 1.0 release
changes:
* require swift 5.7, remove redundant backwards compatibility code
* make LambdaHandler, EventLoopLambdaHandler, and ByteBufferLambdaHandler disjointed protocols to reduce API surface area
* create coding wrappers for LambdaHandler and EventLoopLambdaHandler to provide bridge to ByteBufferLambdaHandler
* reuse output ByteBuffer to reduce allocations
* add new SimpleLambdaHandler with no-op initializer for simple lambda use cases
* update callsites and tests
* update examples
Co-authored-by: Yim Lee <yim_lee@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
motivation: add an easy wasy for lambda users to package their lambda and upload it to AWS
changes:
* add SwiftPM plugin to package the lambda as zipfile, with the verb "archive"
* use docker to build and package the lambda(s) on macOS and non-amazonlinux
* build directly on when on amazonlinux, zip correctly
Co-authored-by: Yim Lee <yim_lee@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
Since we already required Swift 5.5 for Concurrency (Xcode 13), it's natural to update the demo app to reflect latest SwiftUI changes, which makes the code neater and more expressive.
* take advantage of @main where possible
* move the top level Sample code to the examples subdirectory
* extract a few examples form the "LambdaFunctions" directory (which is really a deployment demo) and move them to the top level Examples directory
* rename "LambdaFunctions" examples as "Deployments" to make their intent clearer
* add a sample that demonstrates how to test a lambda now that SwiftPM can test executables directly
* update the test-sample docker setup to build & test th new samples
* fix a few typos and In/Out typealias left overs
* remove LinuxMain since its no longer required
Modifications:
- Replace `HTTPHandler` with `NIOHTTPClientResponseAggregator`, to fix a CoW issue. This increases performance.
- Ensure that we only use one `EventLoop` in tests.
- Use `syncOperations` to setup the `HTTPClient`.
motivation: align with swift project coc update
changes: update coc to the version used by the swift project (contributor-covenant.org 1.4)
Update 0226-package-manager-target-based-dep-resolution.md
Co-authored-by: Konrad `ktoso` Malawski <ktoso@apple.com>
motivation: keep script up to date
changes:
* use 5.3 nightly
* better support for perf symlink as the location is a moving target
* info about cold/warm start
motivation: demonstrate how to deploy with SAM
changes:
* Add a SAM template for deploying the lambdas to AWS.
* Updated README with instructions on how to do this.
motivation: easier to reason about examples
changes:
* move each example to its own target
* update deployment script to prompt for desired target when multiple targets exist
* add code comments on what the example is about
* add feature-reach example (CurrencyExchange) to help testing use of Foundation features that require curl and libxml
motivation: unique, accurate name
changes:
* rename project to SwiftAWSLambdaRuntime
* rename main module to AWSLambdaRuntime
* rename / simplify sample module names
* adjust readme and scripts
motivation: amazon linux support will land in 5.2
changes:
* remove inline as its default in 5.2
* remove linux test and lean on --enable-test-discovery
* adjust package syntax
* format code to match 5.2
motivation: enable CI
changes: add docker files support for ubuntu 16.04 and 18.04 and swift 5.0 and 5.1
note that eventyally this will need to move to AL2 docker images, but we dont have official ones yet
motivation: better performance
changes:
* simply url configuration to ip and port so we can reoslve the socket add ress faster
* skip happy eyeballs
* limit eventloop group to 1 thread
* remove use of UUID and URL
* fix backtrace url
motivation: benchmark for comparison of warm/cold runs
changes:
* refactor configuration
* add mock server that can be used by perf tests
* add simple perf test script
* change redundant classes to structs, make remaining classes final
* make offloading opt-in
* safer locking
* fix format
motivation: make code simpler to reason about, better use of swift-nio
changes:
* remove main loop on global queue + wait, replace with recursion
* make better use of EvenLoopFuture, instead of result types to signal errors
* inject lifecycleId so we can share offloading queue
* improve logging
* adjust and improve tests
* update sanity and generate linux tests script to work better with dates and swiftformat