This release contains two important changes. Please read the migration notes below before upgrading.
1. Amazon Linux 2023 is now the default build container
Starting June 30, 2026, Amazon Linux 2 has reached end of support. Following the plan described in #668 and the Swift Forum discussion, the Swift Lambda Runtime plugins now use Amazon Linux 2023 (swift:<version>-amazonlinux2023) as the default base Docker image for cross-compiling your code.
Warning
Amazon Linux 2 and Amazon Linux 2023 ship different versions of glibc, so a binary built on AL2023 is not compatible with the provided.al2 runtime. When you compile on Amazon Linux 2023, you must update your deployment to Amazon Linux 2023 (provided.al2023) too:
- SAM / CloudFormation:
Runtime: provided.al2→Runtime: provided.al2023 - CDK:
lambda.Runtime.PROVIDED_AL2→lambda.Runtime.PROVIDED_AL2023
If you need to keep building for Amazon Linux 2 during the transition, you can still pass --base-docker-image swift:<version>-amazonlinux2 explicitly.
PR: #675
2. New plugins available on Swift 6.4+
The new plugin system, lambda-init, lambda-build, and lambda-deploy (introduced in #567), is now available, but requires Swift 6.4 or later. See the user guide in #567.
TL;DR
mkdir test && cd test
# Use Swift 6.4
swiftly use 6.4.x-snapshot
# Create a new project
swift package init --type executable --name MyLambda
# Add dependency on the Swift AWS Lambda Runtime
swift package add-dependency https://github.com/awslabs/swift-aws-lambda-runtime.git --from 2.11.0
swift package add-target-dependency AWSLambdaRuntime MyLambda --package swift-aws-lambda-runtime
# Scaffold a Lambda function
swift package lambda-init --allow-writing-to-package-directory
# Change Package.swift to
# // swift-tools-version: 6.3
# This is temporary until an official swift:6.4-amazonlinux2023 will be available
# Build for Amazon Linux
swift package --allow-network-connections docker lambda-build
# Deploy to AWS
swift package --allow-network-connections all:443 lambda-deploy
# Delete when done
swift package --allow-network-connections all:443 lambda-deploy --deleteWhy Swift 6.4? The new plugins depend on soto-core, which transitively depends on swift-crypto. swift-crypto declares a minimum macOS platform requirement that is incompatible with this package, which intentionally does not declare a platforms: section (to avoid forcing platform minimums onto downstream packages). Prior to Swift 6.4, SwiftPM's hardcoded default macOS deployment target was too low to satisfy that requirement. Swift 6.4 raises SwiftPM's default macOS deployment target to v12, which satisfies swift-crypto and soto-core without us having to reintroduce a platforms: declaration. These plugins are therefore gated behind Swift 6.4.
Compatibility: The legacy archive plugin remains available on all supported Swift versions so your existing CI does not break. Please migrate to lambda-build when you move to Swift 6.4.
Something broken?
If this release breaks your build or deployment, please file an issue so we can help.
What's Changed
SemVer Minor
- [plugin] v2: lambda-init, lambda-build, lambda-deploy by @sebsto in #567
- [plugin] AmazonLinux2023 is now the default by @sebsto in #675
- [plugin] docs: add "Using the SwiftPM Plugins" article by @sebsto in #677
- [plugin] Fix: resolve the container CLI matching the cross-compile method (lambda-build & archive) by @sebsto in #678
- [plugin] Refactor lambda-build into pluggable build backends + thin-layer plugin args by @sebsto in #679
- [plugin] Move cross-compile backend factory to BuilderConfiguration; fix log handler deprecation warning by @sebsto in #680
- [plugin] Refactor lambda-build packaging into a pluggable ArchiveBackend (ZIP today, OCI-ready) by @sebsto in #681
SemVer Patch
Other Changes
- Misc: improve README and update GH Actions by @sebsto in #671
- Enable soundness docs check by @sebsto in #674
Full Changelog: 2.10.0...2.11.0