19 Commits

Author SHA1 Message Date
Sébastien Stormacq 9f566bf4f1 [plugin] Display a warning when compiling on Amazon Linux 2 and optin documentation and examples for Amazon Linux 2023 (#668)
This PR has been reworked. Instead of silently switching the default
base image based on Swift version, we now:

1. **Keep Amazon Linux 2 as the default** base Docker image for the
packager plugin
2. **Add a prominent deprecation warning** when AL2 is used (either via
Docker or natively), informing developers that AL2 reaches End of Life
on June 30, 2026
3. **Migrate all examples** (READMEs, SAM templates, scripts) to build
and deploy on Amazon Linux 2023 (`provided.al2023` runtime +
`--base-docker-image swift:amazonlinux2023`)
4. **Update documentation** (readme, quick-setup) with migration notes

The warning includes the `--base-docker-image swift:6.3-amazonlinux2023`
flag and reminds developers to use the `provided.al2023` runtime when
deploying.

After June 30, 2026, the default will switch to AL2023.

---

<details>
<summary>Original PR description (superseded)</summary>

~~Now that Docker Hub has official Swift images based on Amazon Linux
2023 (starting with 6.3), the packager plugin picks the right base image
automatically depending on the Swift version:~~
~~- Swift 6.3 and later: `swift:<version>-amazonlinux2023`~~
~~- Earlier versions: `swift:<version>-amazonlinux2` (unchanged
behavior)~~
~~- No version specified (latest): defaults to `amazonlinux2023`~~

~~When only a major version is provided (e.g. `--swift-version 6`
without a minor), we conservatively treat it as 6.0 and use Amazon Linux
2, since we can't be sure it's 6.3+.~~
~~Also added a verbose log line showing the resolved Swift version,
Amazon Linux version, and final base image to help with debugging.~~
~~The `--base-docker-image` flag still overrides everything as before.~~

</details>

---------

Co-authored-by: Sébastien Stormacq <stormacq@amazon.lu>
2026-05-28 10:26:44 +02:00
Sébastien Stormacq 2745fe1b5e drop support for Swift 6.0 (#667)
Drop support fro Swift 6.0 as per ecosystem's policy to support the last
three major versions, now 6.1, 6.2, and 6.3
- CI is updated 
- all docs, readme, and examples are updated to 6.3 as default
2026-05-14 11:00:09 +02:00
Sébastien Stormacq ddad9b9bee Use published dependency by default in examples (#665)
## Summary

Examples now default to the published `swift-aws-lambda-runtime` package
from GitHub, so they work out of the box when cloned standalone (as
described in the READMEs).

CI scripts swap the dependency to the local path (`../..`) before
building, ensuring we still test against the current branch.

### Changes

- **`Examples/APIGatewayV2/Package.swift`** — Default to remote URL,
local path is commented out with clear instructions.
- **`.github/workflows/scripts/use-local-deps.sh`** (new) — Shared
script that rewrites Package.swift to use the local dependency.
- **`integration_tests.sh`**, **`check-archive-plugin.sh`**,
**`check-link-foundation.sh`** — Source `use-local-deps.sh` before
building.
2026-05-11 21:38:11 +02:00
Sébastien Stormacq 72865e405a Update commented deps in examples to use runtime v2 (#616)
Fix example dependencies

Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
2025-12-05 16:48:19 -08:00
Sébastien Stormacq 023b8fe526 Simplify local dependency injection for examples (#612)
See issue #536 

All the examples are now depending on the runtime library located at
`../..`. The `Package.swift` files contain a commented line with the
`.package` to use when user wants to fetch the runtime from GitHub.

---------

Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
2025-11-30 18:48:06 +01:00
Sébastien Stormacq fb31389f88 Fix 565 : HelloWorld and Resource examples now uses Swift 6.2 (#611)
See issues #565 
HelloWorld and Resources examples project now use Swift 6.2

Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
2025-11-30 12:12:34 +01:00
Sébastien Stormacq e58d89148c Replace standard documents and processes with AWS ones (#574)
- Adjust notice, security reporting, code of conduct, contribution
process to the standard AWS documents
- Adjust GitHub issue templates to AWS standard ones.
- Adjust the license header in all source files

---------

Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
2025-10-21 23:27:30 +02:00
Sébastien Stormacq dee635267b change references from /swift-server to /awslabs (#591)
Change Examples, README, and doc to refer to https://github.org/awslabs
instead of https://github.org/swift-server

---------

Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
2025-10-17 16:46:58 +02:00
Sébastien Stormacq 74e4efdbac Apply recommendation for security and reliability (#573)
Apply recommendations in code and documentation

- [CI] restrict permissions to read-all instead of the default write-all
- All examples README.md : add a note about Lambda functions
configuration with improved security and scalability changes for
production environment
- Swift docc documentation: add a note about Lambda functions
configuration with improved security and scalability changes for
production environment

---------

Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
2025-09-27 12:39:16 +02:00
Sébastien Stormacq a1ab8df708 Update toolchain and doc for 6.2 (#564)
In preparation for the 2.0.0 GA release,

- Update `.swift-version`, `Package.swift` and all examples'
`package.swift` to Swift 6.2
- Update all references to `2.0.0-beta.3` to `2.0.0`. This includes the
doc and readme, but also the dependencies in the examples
`Package.swift`. This will temporary break the build of the examples,
until we tag v2.0.0. Note the CI will not be affected as its consumes
the local version of the library
- [CI] Use Swift-6.2-noble for all testing tasks
- Reinstate the script to generate the contributors list and update the
list
2025-09-23 21:12:33 +02:00
Sébastien Stormacq 0a6af5b4e1 prepare 2.0.0-beta.1 (#538)
Change dependencies in `Examples/*` and documentation to `from:
"2.0.0-beta.1"`
2025-07-30 19:08:39 +04:00
Sébastien Stormacq bba711bd18 remove mentions of LambdaRuntImeCore (#495)
Cleanup code from mentions of `LambdaRuntimeCore`
2025-03-06 18:50:32 +01:00
Sébastien Stormacq dbc2f98b62 add local testing instructions to hello world example (#474)
The local testing instruction are missing from the hello world example.
The format of the payload is not intuitive or trivial to guess. We need
to make it explicit
2025-01-29 13:26:56 +01:00
Sébastien Stormacq 3fa610d7f5 [examples] Simplify examples's Package.swift (#454)
remove the platform dance on all examples.
2025-01-08 14:31:34 +00:00
Sébastien Stormacq e5404c95cb [examples] Fix path settings in the examples' Package.swift (#439)
All the `Package.swift` files from the examples use `path: "."` instead
of `path: "Sources"` which triggers error messages when users add a
`Tests` directory.
2024-12-22 07:36:32 +01:00
Sébastien Stormacq 4992ba5bd8 change flag name from --allow-network-access to --allow-network-connections as documented by SPM (#407) 2024-10-18 14:51:23 +02:00
Sébastien Stormacq b4673d264b Add AWS SDK and Soto examples (#396)
* add aws sdk example

* add soto example

* use amazonlinux docker image instead of ubuntu

* dynamically add runtime dependency based on env var

* remove import of Foundation.ProcessInfo

* workaround https://github.com/actions/checkout/issues/1487
2024-10-10 13:08:31 +02:00
Sébastien Stormacq f7584d1257 add docker fine grained permission to the plugin (#391)
* add docker fine grained permission to the plugin

* swift-format
2024-10-08 14:10:53 +02:00
Sébastien Stormacq db17a62e38 Restructure Examples folder (#387)
* Restructure Examples folder

* add README

* remove v1 examples

* swift format
2024-10-08 11:07:47 +02:00