Swift AWS Lambda Runtime 2.0.0-beta.2 is available

Thank you for your feedback and comments on the first v2 beta. Here is beta 2, with a couple of API changes.

  • LambdaContext.ClientContext is now a struct (was a String?). This is only used for client applications built with the AWS Mobile SDK (now deprecated in favor of AWS Amplify)
  • LambdaContext no more uses DispatchWallTime to keep track of the execution timeout
  • StreamingLambdaHandlerWithEvent is now an example and not part of the runtime API. This struct introduced a dependency on Lambda Runtime Event, which we don't want in the runtime.

Other minor changes have been introduced: a new Hummingbird Lambda example, fixes in doc, better error reporting when the Lambda data plane closes the connection, fix the performance test scripts, and more. The full list is in the release notes.

We target to publish v2 by end of September or first week of October. Please let us know your feedback as soon as you can.

8 Likes

Swift AWS Lambda Runtime 2.0.0-beta.3 is available, with two set of changes

  1. The LocalServer that the library starts when you run your function locally for testing can now be configured with three environment variables
    LOCAL_LAMBDA_HOST (default to 127.0.0.1)
    LOCAL_LAMBDA_PORT (defaults to 7000)
    LOCAL_LAMBDA_ENDPOINT (defaults to /invoke). This is renamed from LOCAL_LAMBDA_SERVER_ENDPOINT for consistency.

If you have testing scripts that use LOCAL_LAMBDA_SERVER_ENDPOINT, you'll need to update them.

  1. We remove the .platform[.macOS(v15)] requirement from Package.swift. The requirement is now enforced at code level (if you don't compile on macOS15, it will fail). This will simplify inclusions of the library in other packages that have a less strict .platform constraint.
2 Likes