mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-06-02 07:27:33 +00:00
2.9.0
444 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e1e4a15c14 |
Add logGroupName and logStreamName to LambdaContext (follow up) (#664)
Add logGroupName and logStreamName to LambdaContext (#664) ## Summary - Adds `logGroupName` and `logStreamName` properties to `LambdaContext`, read from `AWS_LAMBDA_LOG_GROUP_NAME` and `AWS_LAMBDA_LOG_STREAM_NAME` environment variables - Values are read once at runtime initialization (not on every access) and stored as properties, consistent with how other static config is handled - Matches behavior of Python, Node.js, Java, Go, and other AWS Lambda runtimes Closes #662 ## Test plan - [x] `swift build` compiles cleanly - [x] `swift test --filter LambdaContextTests` — all 8 tests pass - [x] Full test suite (140 tests) passes2.9.0 |
||
|
|
0d160f931b |
Revert "Add logGroupName and logStreamName to LambdaContext (#663)"
This reverts commit
|
||
|
|
e13b94177e |
Add logGroupName and logStreamName to LambdaContext (#663)
## Summary - Adds `logGroupName` and `logStreamName` properties to `LambdaContext`, read from `AWS_LAMBDA_LOG_GROUP_NAME` and `AWS_LAMBDA_LOG_STREAM_NAME` environment variables - Values are read once at runtime initialization (not on every access) and stored as properties, consistent with how other static config is handled - Matches behavior of Python, Node.js, Java, Go, and other AWS Lambda runtimes Closes #662 ## Test plan - [x] `swift build` compiles cleanly - [x] `swift test --filter LambdaContextTests` — all 8 tests pass - [x] Full test suite (140 tests) passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
db771cf844 | Update CDK dependencies in Examples/CDK | ||
|
|
b963eba265 | Update CDK dependencies in Examples/CDK | ||
|
|
a3816ccdda |
Bump yaml and aws-cdk-lib in /Examples/CDK/infra (#661)
Removes [yaml](https://github.com/eemeli/yaml). It's no longer used after updating ancestor dependency [aws-cdk-lib](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib). These dependencies need to be updated together. Removes `yaml` Updates `aws-cdk-lib` from 2.241.0 to 2.248.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cdk/releases">aws-cdk-lib's releases</a>.</em></p> <blockquote> <h2>v2.248.0</h2> <h3>Bug Fixes</h3> <ul> <li><strong>eks:</strong> downgrade isolated subnet validation from error to warning (<a href="https://redirect.github.com/aws/aws-cdk/issues/37500">#37500</a>) (<a href="https://github.com/aws/aws-cdk/commit/470856cadcee34b2ec5e0620fab63838c223fd97">470856c</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/37491">#37491</a></li> </ul> <hr /> <h2>Alpha modules (2.248.0-alpha.0)</h2> <h2>v2.247.0</h2> <h3>⚠ BREAKING CHANGES</h3> <ul> <li>** L1 resources are automatically generated from public CloudFormation Resource Schemas. They are built to closely reflect the real state of CloudFormation. Sometimes these updates can contain changes that are incompatible with previous types, but more accurately reflect reality. In this release we have changed:</li> </ul> <p>aws-bedrockagentcore: AWS::BedrockAgentCore::OnlineEvaluationConfig: ExecutionStatus attribute removed. aws-appstream: AWS::AppStream::ImageBuilder: Name property is now immutable. aws-eks: AWS::EKS::Capability: EKS_CAPABILITY_ACK_S3_LOGS vended log type removed.</p> <h3>Features</h3> <ul> <li>update L1 CloudFormation resource definitions (<a href="https://redirect.github.com/aws/aws-cdk/issues/37410">#37410</a>) (<a href="https://github.com/aws/aws-cdk/commit/bd2c3187323c7bcf8a19943f86682c14c601d1a9">bd2c318</a>)</li> <li><strong>apigatewayv2:</strong> add role support for lambda authorizers (<a href="https://redirect.github.com/aws/aws-cdk/issues/35706">#35706</a>) (<a href="https://github.com/aws/aws-cdk/commit/2fb2f1650e957979e5ebf8292df3a95d41baa4ff">2fb2f16</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/35696">#35696</a></li> <li><strong>batch:</strong> skip unregister job definition on update (<a href="https://redirect.github.com/aws/aws-cdk/issues/36011">#36011</a>) (<a href="https://github.com/aws/aws-cdk/commit/2fb2240d2b2ca922e0603c3e341bb61ce9131155">2fb2240</a>)</li> <li><strong>elasticloadbalancingv2:</strong> jwt verification for application load balancer (<a href="https://redirect.github.com/aws/aws-cdk/issues/36099">#36099</a>) (<a href="https://github.com/aws/aws-cdk/commit/aacd28aac59dbf42973302e3165140d944356b32">aacd28a</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/36096">#36096</a></li> </ul> <h3>Bug Fixes</h3> <ul> <li>bump brace-expansion from 5.0.3 to 5.0.5 to address CVE-2026-33750 (<a href="https://redirect.github.com/aws/aws-cdk/issues/37379">#37379</a>) (<a href="https://github.com/aws/aws-cdk/commit/69cf4c9c44c610eb029d92e355efcf6e7f931ed2">69cf4c9</a>)</li> <li>prevent prototype pollution in 2 APIs (<a href="https://redirect.github.com/aws/aws-cdk/issues/37453">#37453</a>) (<a href="https://github.com/aws/aws-cdk/commit/101653766cab8a8112608e170f5e07f5b962ba49">1016537</a>)</li> <li><strong>aws-cdk-lib:</strong> condensed stack trace hides namespaced package name (<a href="https://redirect.github.com/aws/aws-cdk/issues/37413">#37413</a>) (<a href="https://github.com/aws/aws-cdk/commit/cb8e7fbc9fc10682d505b2cdba1a7ce173b0dfd3">cb8e7fb</a>)</li> </ul> <hr /> <h2>Alpha modules (2.247.0-alpha.0)</h2> <h3>Features</h3> <ul> <li><strong>mediapackagev2-alpha:</strong> new L2 construct (<a href="https://redirect.github.com/aws/aws-cdk/issues/37279">#37279</a>) (<a href="https://github.com/aws/aws-cdk/commit/7debfb9c5e807fac5df6e9e0ea3097d72325ffbc">7debfb9</a>)</li> </ul> <h2>v2.246.0</h2> <h3>Features</h3> <ul> <li><strong>bedrock:</strong> add MiniMax and GLM foundation model identifiers (<a href="https://redirect.github.com/aws/aws-cdk/issues/37348">#37348</a>) (<a href="https://github.com/aws/aws-cdk/commit/201534444ac183959119c1849f34931fa8f3d18d">2015344</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/37347">#37347</a></li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>dynamodb:</strong> throw error when grantee is an unsupported ServicePrincipal (<a href="https://redirect.github.com/aws/aws-cdk/issues/37335">#37335</a>) (<a href="https://github.com/aws/aws-cdk/commit/d12754fdeda48181b235cbf563358ffeaa1e4c2f">d12754f</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/35817">#35817</a> <a href="https://redirect.github.com/aws//redirect.github.com/aws/aws-cdk/issues/37273/issues/issuecomment-4099645443">aws/aws-cdk#37273</a></li> <li><strong>lambda-nodejs:</strong> use powershell for spawn steps on Windows (<a href="https://redirect.github.com/aws/aws-cdk/issues/37412">#37412</a>) (<a href="https://github.com/aws/aws-cdk/commit/a92105c64c4ff30bd85f506ef4f7dec39a923871">a92105c</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/37387">#37387</a></li> <li><strong>core:</strong> noisy property deprecation warnings (<a href="https://redirect.github.com/aws/aws-cdk/pull/37415">#37415</a>) (<a href="https://github.com/aws/aws-cdk/commit/4fd000271d26a3dd9f1617800d07e02b40af7db1">4fd0002</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/37407">#37407</a></li> </ul> <h3>Reverts</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.alpha.md">aws-cdk-lib's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <p>All notable changes to this project will be documented in this file. See <a href="https://github.com/conventional-changelog/standard-version">standard-version</a> for commit guidelines.</p> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.247.0-alpha.0...v2.248.0-alpha.0">2.248.0-alpha.0</a> (2026-04-02)</h2> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.246.0-alpha.0...v2.247.0-alpha.0">2.247.0-alpha.0</a> (2026-04-02)</h2> <h3>Features</h3> <ul> <li><strong>mediapackagev2-alpha:</strong> new L2 construct (<a href="https://redirect.github.com/aws/aws-cdk/issues/37279">#37279</a>) (<a href="https://github.com/aws/aws-cdk/commit/7debfb9c5e807fac5df6e9e0ea3097d72325ffbc">7debfb9</a>)</li> </ul> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.245.0-alpha.0...v2.246.0-alpha.0">2.246.0-alpha.0</a> (2026-03-31)</h2> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.244.0-alpha.0...v2.245.0-alpha.0">2.245.0-alpha.0</a> (2026-03-27)</h2> <h3>Features</h3> <ul> <li><strong>s3tables-alpha:</strong> add support for partition spec, sort order, and table properties (<a href="https://redirect.github.com/aws/aws-cdk/issues/36811">#36811</a>) (<a href="https://github.com/aws/aws-cdk/commit/2696cd16e8e2edc8d40f1443b9c87eb6171e5d1f">2696cd1</a>)</li> <li><strong>s3tables-alpha:</strong> add metrics configuration support for TableBucket (<a href="https://redirect.github.com/aws/aws-cdk/issues/37275">#37275</a>) (<a href="https://github.com/aws/aws-cdk/commit/e8786f5d782d906971f933a2d6d432309d5384d7">e8786f5</a>)</li> <li><strong>s3tables-alpha:</strong> implement ITaggableV2 on TableBucket and Table L2 constructs (<a href="https://redirect.github.com/aws/aws-cdk/issues/37277">#37277</a>) (<a href="https://github.com/aws/aws-cdk/commit/69c8944ea3f4abf0f4218af2fc42c8e862e8cad3">69c8944</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/33054">#33054</a></li> </ul> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.243.0-alpha.0...v2.244.0-alpha.0">2.244.0-alpha.0</a> (2026-03-19)</h2> <h3>Bug Fixes</h3> <ul> <li><strong>kinesisanalytics-flink-alpha:</strong> mark deprecated flink runtimes as deprecated (<a href="https://redirect.github.com/aws/aws-cdk/issues/37155">#37155</a>) (<a href="https://github.com/aws/aws-cdk/commit/0a894472650bb1a2c41050ae2b00581fb937c924">0a89447</a>)</li> </ul> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.242.0-alpha.0...v2.243.0-alpha.0">2.243.0-alpha.0</a> (2026-03-11)</h2> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.241.0-alpha.0...v2.242.0-alpha.0">2.242.0-alpha.0</a> (2026-03-10)</h2> <h3>Features</h3> <ul> <li><strong>mixins-preview:</strong> allow passing resource objects into properties in CFN Property mixins (<a href="https://redirect.github.com/aws/aws-cdk/issues/37148">#37148</a>) (<a href="https://github.com/aws/aws-cdk/commit/f2386291a50961660135b6d13b576a3744fa5ecf">f238629</a>)</li> <li><strong>mixins-preview:</strong> generate EventBridge pattern for all events (<a href="https://redirect.github.com/aws/aws-cdk/issues/37081">#37081</a>) (<a href="https://github.com/aws/aws-cdk/commit/f30e8360112c724ce386f26d7d2bf10d6a58e479">f30e836</a>)</li> <li><strong>mixins-preview:</strong> support custom merge strategies via IMergeStrategy (<a href="https://redirect.github.com/aws/aws-cdk/issues/37170">#37170</a>) (<a href="https://github.com/aws/aws-cdk/commit/0dec0113c45f5808e2afd45ac5be1d044e577a4b">0dec011</a>)</li> </ul> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.240.0-alpha.0...v2.241.0-alpha.0">2.241.0-alpha.0</a> (2026-03-02)</h2> <h3>Features</h3> <ul> <li><strong>mixins-preview:</strong> add <code>recordFields</code> and <code>outputFormat</code> to Vended Logs Mixin (<a href="https://redirect.github.com/aws/aws-cdk/issues/37042">#37042</a>) (<a href="https://github.com/aws/aws-cdk/commit/dd94c312ae77cd9b51cbf6d544c85a2af6a7cdc8">dd94c31</a>)</li> <li><strong>mixins-preview:</strong> cross account delivery destinations (<a href="https://redirect.github.com/aws/aws-cdk/issues/36827">#36827</a>) (<a href="https://github.com/aws/aws-cdk/commit/a759eb69d560ff039d09d62e91627bb267a664e5">a759eb6</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cdk/commit/78536e699d4c5acac876156ea0c2aaab7dff3f82"><code>78536e6</code></a> Merge branch 'main' into merge-back/2.247.0</li> <li><a href="https://github.com/aws/aws-cdk/commit/470856cadcee34b2ec5e0620fab63838c223fd97"><code>470856c</code></a> fix(eks): downgrade isolated subnet validation from error to warning (<a href="https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib/issues/37500">#37500</a>)</li> <li><a href="https://github.com/aws/aws-cdk/commit/7b6c66ff5b92e4071d41defc46558e0c73c887d8"><code>7b6c66f</code></a> chore: update analytics metadata blueprints</li> <li><a href="https://github.com/aws/aws-cdk/commit/6fc7add92e3355556777cd088487259325acaf6f"><code>6fc7add</code></a> chore: yarn upgrade dependencies requiring intervention (<a href="https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib/issues/36806">#36806</a>)</li> <li><a href="https://github.com/aws/aws-cdk/commit/bd2c3187323c7bcf8a19943f86682c14c601d1a9"><code>bd2c318</code></a> feat: update L1 CloudFormation resource definitions (<a href="https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib/issues/37410">#37410</a>)</li> <li><a href="https://github.com/aws/aws-cdk/commit/2fb2f1650e957979e5ebf8292df3a95d41baa4ff"><code>2fb2f16</code></a> feat(apigatewayv2): add role support for lambda authorizers (<a href="https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib/issues/35706">#35706</a>)</li> <li><a href="https://github.com/aws/aws-cdk/commit/aacd28aac59dbf42973302e3165140d944356b32"><code>aacd28a</code></a> feat(elasticloadbalancingv2): jwt verification for application load balancer ...</li> <li><a href="https://github.com/aws/aws-cdk/commit/101653766cab8a8112608e170f5e07f5b962ba49"><code>1016537</code></a> fix: prevent prototype pollution in 2 APIs (<a href="https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib/issues/37453">#37453</a>)</li> <li><a href="https://github.com/aws/aws-cdk/commit/2fb2240d2b2ca922e0603c3e341bb61ce9131155"><code>2fb2240</code></a> feat(batch): skip unregister job definition on update (<a href="https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib/issues/36011">#36011</a>)</li> <li><a href="https://github.com/aws/aws-cdk/commit/372571a41a93694a3f48046f22508353df323ce3"><code>372571a</code></a> Merge branch 'main' into merge-back/2.246.0</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cdk/commits/v2.248.0/packages/aws-cdk-lib">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/awslabs/swift-aws-lambda-runtime/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
f3bd0ae938 |
Bump picomatch from 2.3.1 to 2.3.2 in /Examples/CDK/infra (#660)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/micromatch/picomatch/releases">picomatch's releases</a>.</em></p> <blockquote> <h2>2.3.2</h2> <p>This is a security release fixing several security relevant issues.</p> <h2>What's Changed</h2> <ul> <li>fix: exception when glob pattern contains constructor by <a href="https://github.com/Jason3S"><code>@Jason3S</code></a> in <a href="https://redirect.github.com/micromatch/picomatch/pull/144">micromatch/picomatch#144</a></li> <li>Fix for <a href="https://github.com/micromatch/picomatch/security/advisories/GHSA-c2c7-rcm5-vvqj">CVE-2026-33671</a></li> <li>Fix for <a href="https://github.com/micromatch/picomatch/security/advisories/GHSA-3v7f-55p6-f55p">CVE-2026-33672</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md">picomatch's changelog</a>.</em></p> <blockquote> <h1>Release history</h1> <p><strong>All notable changes to this project will be documented in this file.</strong></p> <p>The format is based on <a href="http://keepachangelog.com/en/1.0.0/">Keep a Changelog</a> and this project adheres to <a href="http://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p> <!-- raw HTML omitted --> <ul> <li>Changelogs are for humans, not machines.</li> <li>There should be an entry for every single version.</li> <li>The same types of changes should be grouped.</li> <li>Versions and sections should be linkable.</li> <li>The latest version comes first.</li> <li>The release date of each versions is displayed.</li> <li>Mention whether you follow Semantic Versioning.</li> </ul> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <p>Changelog entries are classified using the following labels <em>(from <a href="http://keepachangelog.com/">keep-a-changelog</a></em>):</p> <ul> <li><code>Added</code> for new features.</li> <li><code>Changed</code> for changes in existing functionality.</li> <li><code>Deprecated</code> for soon-to-be removed features.</li> <li><code>Removed</code> for now removed features.</li> <li><code>Fixed</code> for any bug fixes.</li> <li><code>Security</code> in case of vulnerabilities.</li> </ul> <!-- raw HTML omitted --> <h2>4.0.0 (2024-02-07)</h2> <h3>Fixes</h3> <ul> <li>Fix bad text values in parse <a href="https://redirect.github.com/micromatch/picomatch/issues/126">#126</a>, thanks to <a href="https://github.com/connor4312"><code>@connor4312</code></a></li> </ul> <h3>Changed</h3> <ul> <li>Remove process global to work outside of node <a href="https://redirect.github.com/micromatch/picomatch/issues/129">#129</a>, thanks to <a href="https://github.com/styfle"><code>@styfle</code></a></li> <li>Add sideEffects to package.json <a href="https://redirect.github.com/micromatch/picomatch/issues/128">#128</a>, thanks to <a href="https://github.com/frandiox"><code>@frandiox</code></a></li> <li>Removed <code>os</code>, make compatible browser environment. See <a href="https://redirect.github.com/micromatch/picomatch/issues/124">#124</a>, thanks to <a href="https://github.com/gwsbhqt"><code>@gwsbhqt</code></a></li> </ul> <h2>3.0.1</h2> <h3>Fixes</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/micromatch/picomatch/commit/81cba8d4b767cab3cb29d26eb4f691eed75b73b2"><code>81cba8d</code></a> Publish 2.3.2</li> <li><a href="https://github.com/micromatch/picomatch/commit/fc1f6b69006e9435caf8fb40d8aff378bc0b7bce"><code>fc1f6b6</code></a> Merge commit from fork</li> <li><a href="https://github.com/micromatch/picomatch/commit/eec17aee5428a7249e9ca5adbb8a0d28fa29619b"><code>eec17ae</code></a> Merge commit from fork</li> <li><a href="https://github.com/micromatch/picomatch/commit/78f8ca4362d9e66cadea97b93e292f10096452ed"><code>78f8ca4</code></a> Merge pull request <a href="https://redirect.github.com/micromatch/picomatch/issues/156">#156</a> from micromatch/backport-144</li> <li><a href="https://github.com/micromatch/picomatch/commit/3f4f10eaa65bf3a52e8f2999674cd27e11fa3c9b"><code>3f4f10e</code></a> Merge pull request <a href="https://redirect.github.com/micromatch/picomatch/issues/144">#144</a> from Jason3S/jdent-object-properties</li> <li>See full diff in <a href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/awslabs/swift-aws-lambda-runtime/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
f62b215394 |
Update dependencies on the CDK example (#659)
Just an update of the depencies to address critical security issues in the downstream dependencies |
||
|
|
3772bd6352 |
chore: remove mock writeStatusAndHeaders shadowing in writer tests (#657)
<!--- Provide a general summary of your changes in the Title above --> ## Issue \# <!--- If it fixes an issue, please link to the issue here --> N/A ## Description of changes <!--- Why is this change required? What problem does it solve? --> - Several test mocks in `LambdaResponseStreamWriter+HeadersTests.swift` implemented their own `writeStatusAndHeaders(...)`. - This change is required to make the tests validate actual behavior instead of mock-only behavior. ## New/existing dependencies impact assessment, if applicable <!--- No new dependencies were added to this change. --> <!--- If any dependency was added / modified / removed, THIRD-PARTY-LICENSES must be updated accordingly. --> ## Conventional Commits <!--- Please use conventional commits to let us know what kind of change this is.--> <!--- More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/--> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. |
||
|
|
3e528b2944 |
Update plugin spec (#658)
- reinstate new plugins spec v3 doc - create a new plugins spec v4. This one proposes to use soto-core + soto code generator instead of shipping code from other projects and / or developing everything ourselves --------- Co-authored-by: Sébastien Stormacq <stormacq@amazon.lu> |
||
|
|
b1162f5a75 |
fix: preserve provided loggingConfiguration in lambda runloop overloa… (#656)
…d function <!--- Provide a general summary of your changes in the Title above --> ## Issue \# <!--- If it fixes an issue, please link to the issue here --> N/A ## Description of changes <!--- Why is this change required? What problem does it solve? --> The change fixes a regression in the deprecated`Lambda.runLoop(runtimeClient:handler:loggingConfiguration:logger:)` overload. The overload was ignoring the caller-provided `loggingConfiguration` and rebuilding a new one from `Logger`. ## New/existing dependencies impact assessment, if applicable <!--- No new dependencies were added to this change. --> <!--- If any dependency was added / modified / removed, THIRD-PARTY-LICENSES must be updated accordingly. --> ## Conventional Commits <!--- Please use conventional commits to let us know what kind of change this is.--> <!--- More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/--> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. |
||
|
|
74b1e6bbda |
propagate isSingleConcurrencyMode from Lambda to LambadRuntime (#655)
This is an intermediate PR to simplify code review on https://github.com/awslabs/swift-aws-lambda-runtime/pull/652/changes#diff-cec9c6a5c4d161a427105af49fb7e3a990468f324021d4f5e6b2ad14db1a2345 I |
||
|
|
56e822f943 |
Bump minimatch and aws-cdk-lib in /Examples/CDK/infra (#654)
Removes [minimatch](https://github.com/isaacs/minimatch). It's no longer used after updating ancestor dependency [aws-cdk-lib](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk-lib). These dependencies need to be updated together. Removes `minimatch` Updates `aws-cdk-lib` from 2.240.0 to 2.240.0 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.alpha.md">aws-cdk-lib's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <p>All notable changes to this project will be documented in this file. See <a href="https://github.com/conventional-changelog/standard-version">standard-version</a> for commit guidelines.</p> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.239.0-alpha.0...v2.240.0-alpha.0">2.240.0-alpha.0</a> (2026-02-23)</h2> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.238.0-alpha.0...v2.239.0-alpha.0">2.239.0-alpha.0</a> (2026-02-19)</h2> <h3>⚠ BREAKING CHANGES</h3> <p>redshift-alpha: update default node type from <code>DC2_LARGE</code> to <code>RA3_LARGE</code></p> <h3>Features</h3> <ul> <li><strong>bedrock-agentcore-alpha:</strong> add <code>fromCodeAsset</code> method to create runtime artifact with local code assets (<a href="https://redirect.github.com/aws/aws-cdk/issues/36472">#36472</a>) (<a href="https://github.com/aws/aws-cdk/commit/c5a87e6682a3668de849d4c7a0913fdee3eb170c">c5a87e6</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/36473">#36473</a></li> <li><strong>bedrock-agentcore-alpha:</strong> added new target type (api gateway) in agentcore gateway target. (<a href="https://redirect.github.com/aws/aws-cdk/issues/36841">#36841</a>) (<a href="https://github.com/aws/aws-cdk/commit/0842754ec56412a9b22f2e92f5aea7c86129ec52">0842754</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/36817">#36817</a></li> <li><strong>mixins-preview:</strong> add ECS ClusterSettingsMixin (<a href="https://redirect.github.com/aws/aws-cdk/issues/36796">#36796</a>) (<a href="https://github.com/aws/aws-cdk/commit/b8ab5be8f2e0733433a55dd48b26e7f56f6e0393">b8ab5be</a>)</li> <li><strong>mixins-preview:</strong> add s3 bucket mixin for publicAccessBlock (<a href="https://redirect.github.com/aws/aws-cdk/issues/36905">#36905</a>) (<a href="https://github.com/aws/aws-cdk/commit/feed4b2690bd481e464dd3ececa4cba0997a03db">feed4b2</a>)</li> <li><strong>mixins-preview:</strong> send Vended Logs to pre-created DeliveryDestination using <code>toDestination()</code> (<a href="https://redirect.github.com/aws/aws-cdk/issues/36896">#36896</a>) (<a href="https://github.com/aws/aws-cdk/commit/48f1fe6aa86473a25ffdcf53cfecb5e1169b54db">48f1fe6</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>redshift-alpha:</strong> update default node type from <code>DC2_LARGE</code> to <code>RA3_LARGE</code> (<a href="https://redirect.github.com/aws/aws-cdk/issues/36516">#36516</a>) (<a href="https://github.com/aws/aws-cdk/commit/ea19e5cde2e64d5cdcdfa3af41764542e77e221c">ea19e5c</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/36416">#36416</a></li> </ul> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.237.1-alpha.0...v2.238.0-alpha.0">2.238.0-alpha.0</a> (2026-02-09)</h2> <h3>Features</h3> <ul> <li><strong>eks-v2-alpha:</strong> add support for bootstrapSelfManagedAddons (<a href="https://redirect.github.com/aws/aws-cdk/issues/36740">#36740</a>) (<a href="https://github.com/aws/aws-cdk/commit/1ffe38dc950a096cb5e1c1ee20f2c49899dc0a23">1ffe38d</a>)</li> <li><strong>eks-v2-alpha:</strong> add support for EKS hybrid nodes (<a href="https://redirect.github.com/aws/aws-cdk/issues/36749">#36749</a>) (<a href="https://github.com/aws/aws-cdk/commit/48ace56d82537630fc339cb41962473a97375aea">48ace56</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>eks-v2-alpha:</strong> ensure kubectl provider and handler functions use the same vpc configuration (<a href="https://redirect.github.com/aws/aws-cdk/issues/36735">#36735</a>) (<a href="https://github.com/aws/aws-cdk/commit/4e02f0896069105dae83c46f19f1b346a546ad57">4e02f08</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/34878">#34878</a> <a href="https://redirect.github.com/aws/aws-cdk/issues/34877">#34877</a></li> <li><strong>ivs-alpha:</strong> add region constraints to integration tests (<a href="https://redirect.github.com/aws/aws-cdk/issues/36851">#36851</a>) (<a href="https://github.com/aws/aws-cdk/commit/d55fec42357410b8263b814b931daf5dccc5c5e3">d55fec4</a>)</li> <li><strong>mixins-preview:</strong> apply mixins in order (<a href="https://redirect.github.com/aws/aws-cdk/issues/36847">#36847</a>) (<a href="https://github.com/aws/aws-cdk/commit/726060c0ea9f57de4c6e13c1f50c330e4fc2608e">726060c</a>)</li> <li><strong>mixins-preview:</strong> apply mixins in order in <code>MixinApplicator</code> (<a href="https://redirect.github.com/aws/aws-cdk/issues/36877">#36877</a>) (<a href="https://github.com/aws/aws-cdk/commit/09db1c99710c9f8e91774e767de93fff1a0d2650">09db1c9</a>), closes <a href="https://redirect.github.com/aws/aws-cdk/issues/36847">#36847</a></li> </ul> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.237.0-alpha.0...v2.237.1-alpha.0">2.237.1-alpha.0</a> (2026-02-03)</h2> <h2><a href="https://github.com/aws/aws-cdk/compare/v2.236.0-alpha.0...v2.237.0-alpha.0">2.237.0-alpha.0</a> (2026-02-02)</h2> <h3>Features</h3> <ul> <li><strong>bedrock-agentcore-alpha:</strong> add support for custom claims and scopes to runtime/gateway authorizers (<a href="https://redirect.github.com/aws/aws-cdk/issues/36810">#36810</a>) (<a href="https://github.com/aws/aws-cdk/commit/a3abcd010648e83bed273dff8f581291b5b3c902">a3abcd0</a>)</li> <li><strong>eks-v2-alpha:</strong> pass additional helm chart values to aws-load-balancer-controller (<a href="https://redirect.github.com/aws/aws-cdk/issues/36754">#36754</a>) (<a href="https://github.com/aws/aws-cdk/commit/cf61814ac58448ddd70682e45c07dd8ca58c4fd1">cf61814</a>), closes <a href="https://github.com/aws//github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/helm/aws-load-balancer-controller/values.yaml/issues/L199">/github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/helm/aws-load-balancer-controller/values.yaml#L199</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/aws/aws-cdk/commits/v2.240.0/packages/aws-cdk-lib">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/awslabs/swift-aws-lambda-runtime/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
553b5e3716 |
Add support for JSON Structured Logging (#638)
This PR adds support for Structured Logging, as per [the design document](https://github.com/awslabs/swift-aws-lambda-runtime/blob/feature/structured-json-logging/Sources/AWSLambdaRuntime/Docs.docc/Proposals/0002-logging.md) --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.8.0 |
||
|
|
1df89fd39b |
Implement a cache for integration test (#649)
This PR divides the CI time by ~2 ## Issue # N/A ## Description of changes This PR makes two changes to the integration tests workflow: 1. Replace the manual `git clone` checkout with `actions/checkout@v4` in the `test-examples` job. The container image was updated from Amazon Linux 2 to `swift:6.2` (Ubuntu-based), which supports Node.js-based GitHub Actions. This also removes the now-unnecessary `working-directory` overrides that pointed to the repository subdirectory created by the manual clone. 2. Add SPM dependency caching (`actions/cache@v4`) to the `test-examples`, `test-archive-plugin`, and `check-foundation` jobs. Each example's `.build` directory is cached with a key scoped per example name, avoiding cross-contamination between different dependency sets. ## New/existing dependencies impact assessment, if applicable No new dependencies were added to this change. This only adds the `actions/cache@v4` GitHub Action to the CI workflow. ## Conventional Commits `ci: switch to actions/checkout and add SPM dependency caching in integration tests` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> Co-authored-by: Tim Condon <0xTim@users.noreply.github.com> |
||
|
|
748ced263c |
update dependencies (#651)
Update dependencies to fetch swift-async-algorithms 1.1.2 Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
f86f4e202d |
Update CDK dependencies (#650)
## Issue \# Fixes Dependabot alert #11 (minimatch ReDoS) and Dependabot alert #12 (ajv ReDoS). ## Description of changes Upgrades CDK dependencies in `Examples/CDK/infra/` to resolve two ReDoS vulnerabilities in bundled transitive dependencies: - `aws-cdk`: `2.1003.0` → `2.1015.0` - `aws-cdk-lib`: `^2.189.1` → `^2.215.0` (resolves to `2.240.0`) The new `aws-cdk-lib` bundles `minimatch@^10.2.1` (was `3.1.2`) and `ajv@8.18.0` (was `8.17.1`), which address the reported vulnerabilities. `npm audit` now reports 0 vulnerabilities. ## New/existing dependencies impact assessment, if applicable No new dependencies were added. Existing dependencies `aws-cdk` and `aws-cdk-lib` were updated to their latest versions. `package-lock.json` was regenerated. ## Conventional Commits `fix: upgrade CDK dependencies to resolve minimatch and ajv ReDoS vulnerabilities` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
6aa43874c8 |
feat: Added support for apple container (#647)
<!--- Provide a general summary of your changes in the Title above --> ## Issue \# <!--- If it fixes an issue, please link to the issue here --> https://github.com/awslabs/swift-aws-lambda-runtime/issues/644 ## Description of changes <!--- Why is this change required? What problem does it solve? --> - Added `--container-cli` option to the archive SwiftPM plugin so users can choose Docker (default) or Apple container - Implemented Apple container support by switching pull/run commands to `container image pull` and `container run` - Documented the Apple container path in readme.md - swift test passed ## New/existing dependencies impact assessment, if applicable <!--- No new dependencies were added to this change. --> <!--- If any dependency was added / modified / removed, THIRD-PARTY-LICENSES must be updated accordingly. --> N/A ## Conventional Commits <!--- Please use conventional commits to let us know what kind of change this is.--> <!--- More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/--> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.7.0 |
||
|
|
22dd7012de |
Archive plugin supports Amazon Linux 2023 in addition to Amazon Linux 2 (#646)
Relax the check on Amazon Linux to also consider Amazon Linux 2023 and future versions Fix #6452.6.3 |
||
|
|
eccd045d80 |
fix: Local Server should pass HTTP headers down to the Lambda Runtime (#643)
<!--- Provide a general summary of your changes in the Title above --> ## Issue \# <!--- If it fixes an issue, please link to the issue here --> https://github.com/awslabs/swift-aws-lambda-runtime/issues/607 ## Description of changes <!--- Why is this change required? What problem does it solve? --> The local HTTP server was not forwarding user‑provided headers to the runtime’s response. It passes all headers through to the runtime. This it makes local behavior match the Lambda runtime API contract and allows developers to opt into metadata by sending the appropriate runtime headers. ## New/existing dependencies impact assessment, if applicable <!--- No new dependencies were added to this change. --> <!--- If any dependency was added / modified / removed, THIRD-PARTY-LICENSES must be updated accordingly. --> N/A ## Conventional Commits <!--- Please use conventional commits to let us know what kind of change this is.--> <!--- More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/--> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com> |
||
|
|
d9aebab425 | Update Plugin Spec doc to add Apple container | ||
|
|
11ef057299 |
Fix more crashes in archive (#642)
## Issue # Related to intermittent CI crashes with Signal 11 (SIGSEGV) during `swift package archive` on Linux x86_64 (Ubuntu 24.04) ## Description of the changes Replaces `FileHandle.readabilityHandler` with a manual blocking read loop using `availableData` on a serial `DispatchQueue` in the `Utils.execute` method of the AWSLambdaPackager plugin. On Linux, `FileHandle.readabilityHandler`'s setter internally calls `_bridgeAnythingToObjectiveC`, which triggers `swift_dynamicCast` / `swift_conformsToProtocol`. When the Swift runtime is concurrently resolving type metadata on other threads, this causes a bad pointer dereference crash in `_dispatch_event_loop_drain`. The new approach uses a `while` loop calling `availableData` (blocks until data arrives, returns empty `Data` at EOF), completely avoiding the problematic Foundation/ObjC bridging code paths. ## New/existing dependencies impact assessment, if applicable No new dependencies were added to this change. ## Conventional Commits `fix: replace FileHandle.readabilityHandler with manual read loop in AWSLambdaPackager plugin` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
4a917a74de |
Fix crash on Linux when testing the archive plugin (#641)
Fix a rare crash in CI on the archive plugin. The crash is a race condition in `PluginUtils.swift`'s execute method. The code set a `terminationHandler` on the `Process` that called `readToEnd()` on the pipe, while simultaneously the `readabilityHandler` could still be firing on the same pipe's file handle. On Linux (x86_64, Ubuntu 24.04 in CI), this race corrupts memory during Swift runtime metadata resolution (`swift_conformsToProtocol, _swift_getGenericMetadata`), which manifests as the `SIGSEGV` we're seeing in `_dispatch_event_loop_drain`. The fix: I removed the `terminationHandler` entirely. Since `waitUntilExit()` is already called synchronously, we know the process is done. After `waitUntilExit()`, we set `readabilityHandler = nil` to stop the async reads, then do one final `readToEnd()` on the output queue to drain any remaining data. This eliminates the race between the readability handler and the termination handler competing over the same file handle. Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.6.2 |
||
|
|
fef8c0d130 |
Fix for swift test : _Concurrency/Executor.swift:357: Fatal error (#639)
Fix the issue described at https://github.com/awslabs/swift-aws-lambda-runtime/issues/640 Here is the proposed fix: I added a new function `assumeIsolatedOnEventLoop` — a nonisolated method that: 1. Calls `self.eventLoop.preconditionInEventLoop()` to verify we're on the correct event loop (NIO's own thread-identity check, which always works) 2. Uses `unsafeBitCast` to strip the isolated annotation, the same pattern NIO uses internally and that I found on the Swift Forums. See: https://github.com/swiftlang/swift/blob/main/stdlib/public/Concurrency/ExecutorAssertions.swift#L348 See: https://forums.swift.org/t/actor-assumeisolated-erroneously-crashes-when-using-a-dispatch-queue-as-the-underlying-executor/72434/3 --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
a8a54d9d98 |
Add docc for Lambda Managed Instances (#637)
Add a docc page to cover Lambda Managed instanced added at version 2.6.0 --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.6.1 |
||
|
|
190eb81876 |
Add support for Lambda Managed Instances without changing the public API [Convenience + Example] (#623)
This PR builds on https://github.com/awslabs/swift-aws-lambda-runtime/pull/629 to add convenience structs (Handlers and Adapters) that are `Sendable` **Changes** - **Added Sendable adapter types**: Implemented `ClosureHandlerSendable` - a thread-safe version of existing closure handler that enforces `Sendable` conformance for concurrent execution environments - and added conditional conformance to `Sendable` for other Adapters when the Handler is `Sendable` - **Enhanced handler protocols for concurrency**: Extended handler protocols to support `Sendable` constraints and concurrent response writing through `LambdaResponseStreamWriter & Sendable`, enabling safe multi-threaded invocation processing - **Created comprehensive Lambda Managed Instances examples**: Built three demonstration functions showcasing concurrent execution capabilities, streaming responses, and background processing patterns specific to the new managed instances deployment model **Context** Lambda Managed Instances support multi-concurrent invocations where multiple invocations execute simultaneously within the same execution environment. The runtime now detects the configured concurrency level and launches the appropriate number of RICs to handle concurrent requests efficiently. When `AWS_LAMBDA_MAX_CONCURRENCY` is 1 or unset, the runtime maintains the existing single-threaded behaviour for optimal performance on traditional Lambda deployments. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.6.0 |
||
|
|
d456396581 |
Add support for Lambda Managed Instances without changing the public API [CORE] (#629)
AWS launched [Lambda Managed Instances](https://docs.aws.amazon.com/lambda/latest/dg/lambda-managed-instances.html), i.e Lambda functions running on EC2 instances. This comes with [a major change in the programming model](https://docs.aws.amazon.com/lambda/latest/dg/lambda-managed-instances.html#lambda-managed-instances-concurrency-model) as function handlers are now allowed to run concurrently on the same machine (multiple in flight events being processed in parallel in the same execution environment). The maximum concurrency per runtime environment is controlled by the user. This PR adds support for running multiple Runtime Interface Clients (RICs) concurrently when deployed on Lambda Managed Instances, enabling the runtime to handle multiple invocations simultaneously within a single execution environment. This PR is a followup to https://github.com/awslabs/swift-aws-lambda-runtime/pull/617 which used another approach to support Lambda Managed Instances by changing the public API and requiring that all handlers must conform to `Sendable`. The original PR was closed as we agreed that only a fraction of the Lambda functions will be deployed on EC2 and it was not worth adding a `Sendable` requirement for all. **Changes** - **Introduced thread-safe LambdaManagedRuntime**: Created new Sendable-conforming runtime class that supports concurrent handler execution with atomic guards to prevent multiple runtime instances and thread-safe handler requirements (`Handler: StreamingLambdaHandler & Sendable`) - **Implemented ServiceLifecycle integration**: Added managed runtime support for structured concurrency lifecycle management, allowing proper startup/shutdown coordination in multi-concurrent environments This PR contains only changes to the core runtime, convenience functions, handlers, adapters, and a comprehensive example will be added in a follow up PR. **Context** Lambda Managed Instances support multi-concurrent invocations where multiple invocations execute simultaneously within the same execution environment. The runtime now detects the configured concurrency level and launches the appropriate number of RICs to handle concurrent requests efficiently. When `AWS_LAMBDA_MAX_CONCURRENCY` is 1 or unset, the runtime maintains the existing single-threaded behaviour for optimal performance on traditional Lambda deployments. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
ba48cf70b0 | Add source terminal image in tutorial | ||
|
|
4815273dc3 |
Fix race condition in Lambda+LocalServer causing NIOAsyncWriter fatal error (Bug #635) (#636)
On fast machines, the local Lambda server crashes with: ``` Fatal error: Deinited NIOAsyncWriter without calling finish() ``` This occurs in `NIOAsyncChannelHandler.channelActive()` when child connection channels are created. ## Root Cause This is a known issue with NIO's async server channel API (see [swift-nio#2637](https://github.com/apple/swift-nio/issues/2637)). **The fundamental problem:** 1. The async `bind()` API creates `NIOAsyncChannel` instances for incoming connections 2. These channels are yielded through an async stream to the server loop 3. When the serving task is cancelled (or completes), the async stream iteration stops 4. Any channels that were accepted but not yet read from the stream are dropped 5. These unread channels never have `executeThenClose()` called on them 6. Their `NIOAsyncWriter` is deallocated without `finish()` being called → fatal error **Why graceful shutdown doesn't help:** Even closing the server channel gracefully doesn't eliminate the race - there's a timing window where: - A connection is accepted and queued in the async stream - The server task is cancelled or completes - The queued channel is never read and gets dropped IMHO, this is an inherent limitation of the `async bind()` API when combined with task cancellation. ## Solution I stopped using the `async bind()` API entirely. Instead, I use the traditional callback-based `childChannelInitializer`: 1. Create `NIOAsyncChannel` directly in `childChannelInitializer` (synchronous context) 2. Immediately spawn a `Task.detached` to handle the connection 3. Each connection is handled independently, not through a cancellable async stream 4. Detached tasks are not affected by task group cancellation 5. Every channel has `executeThenClose()` called immediately, preventing the writer from being dropped This approach avoids the async stream entirely, eliminating the race condition. ## Changes - Replaced `async bind()` with traditional `childChannelInitializer` - Each connection spawns a `Task.detached` that immediately calls `executeThenClose()` - Removed the connection iteration loop (no longer needed) - Server task now simply waits for the channel to close - Simplified shutdown logic since there's no async stream to drain ## Trade-offs - Uses `Task.detached` (unstructured concurrency) to bridge NIO's event-loop world with Swift concurrency - This is necessary until NIO provides a new bootstrap API that properly handles cancellation - Each connection is handled independently rather than through structured concurrency ## Testing Tested on fast machines where the race condition was reliably reproducible. The crash no longer occurs. ## References - [swift-nio#2637](https://github.com/apple/swift-nio/issues/2637) - Known issue with async server channels and cancellation - [Comment from NIO maintainer](https://github.com/apple/swift-nio/issues/2637#issuecomment-1921317577) - Recommends avoiding cancellation or using callback-based API Fixes #635 --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.5.3 |
||
|
|
102f92aafb |
Fix race condition crash in LambdaRuntimeClient channel lifecycle (Bug #624) (#632)
This PR fixes a race condition in `LambdaRuntimeClient` that causes a
fatal crash when an old channel's `closeFuture` callback fires after a
new connection has been established. The fix adds proper channel
lifecycle tracking and replaces the fatal error with graceful handling.
## Problem
**Crash Location**: `LambdaRuntimeClient.swift:270` in `channelClosed()`
**Error Message**:
```
Fatal error: Invalid state: connected(SocketChannel { ... }), closed
```
**Root Cause**: Race condition where:
1. An old channel's `closeFuture` callback fires
2. AFTER a new connection has been established (`connectionState =
.connected`)
3. BUT `closingState` is `.closed` from a previous close operation
4. The code asserted this was impossible and crashed with `fatalError`
This can occur when:
- Network conditions cause delayed channel cleanup
- Connection is recycled quickly (old channel still closing while new
one connects)
- Timing issues between channel close callbacks and new connection
establishment
## Solution
### Key Changes
1. **Added channel identity tracking**:
```swift
private var channelsBeingClosed: Set<ObjectIdentifier> = []
```
Tracks which channels are in the process of closing to distinguish old
channels from the current one.
2. **Enhanced `connectionWillClose()`**:
- Marks channels as "being closed" using `ObjectIdentifier`
- Adds logging when old channels close while new connection is active
3. **Rewrote `channelClosed()` with defensive logic**:
- **Early return for tracked old channels**: Handles them gracefully
without affecting current connection
- **Replaced `fatalError` with warning log**: The `(_, .closed)` case
now logs a warning instead of crashing
- **Channel identity checks**: Only transitions state if the closing
channel is the CURRENT channel
- **Removed unconditional state change**: Previously set
`connectionState = .disconnected` for ANY channel close, now only for
the current channel
### Why This Fixes the Bug
The fix addresses the race condition by:
- Distinguishing between "current channel closing" vs "old channel
closing"
- Handling old channel closes gracefully without crashing or corrupting
state
- Not overwriting connection state when old channels close
- Providing visibility through logging when the race condition occurs
## Changes
### Modified Files
- **Sources/AWSLambdaRuntime/HTTPClient/LambdaRuntimeClient.swift**
- Added `channelsBeingClosed: Set<ObjectIdentifier>` property
- Enhanced `connectionWillClose()` with channel tracking
- Rewrote `channelClosed()` with defensive logic and identity checks
- Replaced `fatalError` with warning log for unexpected states
- Removed unconditional state change in `closeFuture` callback
**Lines Changed**: ~150 lines modified/added
**Backward Compatibility**: ✅ Fully compatible, no API changes
## Testing
### ✅ All Existing Tests Pass
```bash
swift test
# Result: 91 tests passed in 14 suites
```
All original functionality is preserved with no regressions.
### ⚠️ Note on Test Coverage
While we cannot reproduce the exact race condition from bug #624 in a
deterministic test (it requires specific network timing), the fix:
- Is logically sound for the described race condition
- Improves defensive programming around channel lifecycle
- Replaces a fatal crash with graceful handling + logging
- Should prevent the crash by properly tracking channel identity
## Related Issues
Fixes #624
---------
Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>
|
||
|
|
34e89b4027 |
Fix Test hangs in Lambda+LocalServer (#630) (#631)
# Fix test hangs caused by Pool cancellation race conditions ## Summary This PR fixes two related race conditions in `Lambda+LocalServer+Pool.swift` that were causing the test suite to hang approximately 10% of the time. ## Problem The test suite exhibited intermittent hangs (~10% frequency) due to two bugs in the Pool implementation: 1. **Individual task cancellation bug**: When one task waiting for a specific `requestId` was cancelled, the cancellation handler would incorrectly cancel ALL waiting tasks instead of just the cancelled one. 2. **Server shutdown hang**: When the server shut down, waiting continuations in the pools were never cancelled, causing handlers to wait indefinitely for responses that would never arrive. ## Root Causes ### Root Cause #1: Cancellation Handler Removes ALL Continuations The `onCancel` handler in `Pool._next()` was removing all continuations from the `waitingForSpecific` dictionary when any single task was cancelled: ```swift onCancel: { // BUG: Removes ALL continuations, not just the cancelled task's for continuation in state.waitingForSpecific.values { toCancel.append(continuation) } state.waitingForSpecific.removeAll() } ``` This caused unrelated concurrent invocations to fail with `CancellationError` when one client cancelled their request. ### Root Cause #2: No Pool Cleanup During Server Shutdown When the server shut down (e.g., test completes), the task group was cancelled but the pools' waiting continuations were never notified. The `/invoke` endpoint handlers would continue waiting for responses that would never arrive because the Lambda function had stopped. ## Solution ### Fix #1: Only Remove Specific Continuation on Cancellation Modified the cancellation handler to only remove the continuation for the specific cancelled task: ```swift onCancel: { // Only remove THIS task's continuation let continuationToCancel = self.lock.withLock { state -> CheckedContinuation<T, any Error>? in if let requestId = requestId { return state.waitingForSpecific.removeValue(forKey: requestId) } else { let cont = state.waitingForAny state.waitingForAny = nil return cont } } continuationToCancel?.resume(throwing: CancellationError()) } ``` ### Fix #2: Add Pool Cleanup During Server Shutdown Added `cancelAll()` method to the Pool class and call it during server shutdown: ```swift func cancelAll() { let continuationsToCancel = self.lock.withLock { state -> [CheckedContinuation<T, any Error>] in var toCancel: [CheckedContinuation<T, any Error>] = [] if let continuation = state.waitingForAny { toCancel.append(continuation) state.waitingForAny = nil } for continuation in state.waitingForSpecific.values { toCancel.append(continuation) } state.waitingForSpecific.removeAll() return toCancel } for continuation in continuationsToCancel { continuation.resume(throwing: CancellationError()) } } ``` Called during server shutdown: ```swift let serverOrHandlerResult1 = await group.next()! group.cancelAll() // Cancel all waiting continuations in the pools to prevent hangs server.invocationPool.cancelAll() server.responsePool.cancelAll() ``` ## Changes ### Modified Files - **Sources/AWSLambdaRuntime/HTTPServer/Lambda+LocalServer+Pool.swift** - Fixed cancellation handler in `_next()` to only remove specific continuation - Added `cancelAll()` method for server shutdown cleanup - **Sources/AWSLambdaRuntime/HTTPServer/Lambda+LocalServer.swift** - Call `cancelAll()` on both pools during server shutdown ### New Files - **Tests/AWSLambdaRuntimeTests/LocalServerPoolCancellationTests.swift** - Added comprehensive test suite with 3 tests - `testCancellationOnlyAffectsOwnTask`: Verifies only the cancelled task receives CancellationError - `testConcurrentInvocationsWithCancellation`: Tests real-world scenario with 5 concurrent invocations - `testFIFOModeCancellation`: Ensures FIFO mode cancellation works correctly ## Testing ### Before Fix - Test suite hung ~10% of the time - When 1 task was cancelled, all 5 concurrent tasks received `CancellationError` - Streaming tests would occasionally hang during shutdown ### After Fix - All 91 tests pass consistently without hangs - When 1 task is cancelled, only that specific task receives `CancellationError` - Other tasks continue waiting normally - Server shutdown properly cleans up all waiting continuations - Multiple consecutive test runs confirm stability ### Test Coverage The new test suite reproduces both bugs and verifies the fixes: 1. **testCancellationOnlyAffectsOwnTask**: Creates 3 tasks waiting for different requestIds, cancels only one, and verifies the others are not affected 2. **testConcurrentInvocationsWithCancellation**: Simulates 5 concurrent invocations with one cancellation 3. **testFIFOModeCancellation**: Tests FIFO mode to ensure it still works correctly --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu>2.5.2 |
||
|
|
feb6d2cd49 |
Cleanup script and test example (#628)
Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
61f392df7a |
Refactor LambdaRuntime (#627)
refcator to isolate the code in `startRuntimeInterfaceClient` and `startLocalServer` functions Also change the name of the global variable `_isRunning` to `_isLambdaRuntimeRunning` Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
6d2c5bf91d |
Rename Lambda+JSON file (#626)
Rename Lambda+JSON file to LambdaRuntime+JSON, to prepare for furture support of Lambda Managed Runtime Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
634c36e5d3 |
Lift up the trace limit on payload to make it actually useful when debugging (#625)
When using `trace` log level the runtime diplays 1Kb of the input payload to help debugging cases where the JSON decoding fails. Most of the type, this 1 Kb trace is not enough to understand what part of the incoming JSON fails to decode. This PR raises the limit to 6Mb to be actually useful.2.5.1 |
||
|
|
4b4054d1c4 |
Remove unnecessary Sendable constraint (#622)
This PR removes `Sendable` requirement on `StreamingClosureHandler `. While analyzing code for the upcoming support of Lambda Managed Runtime, I found out that `StreamingClosureHandler` has `Sendable` requirement, which is not necessary. Removing requirement doesn't require a major speed bump as the change is compatible with existing code.2.5.0 |
||
|
|
e0f064a93e |
Refactor project directories (#621)
This PR refactors the project's directories.
As the number of source files grows, I created subdirectories to
separate the runtime itself, from its HTTP Client (`RuntimeClient`) and
local HTTP Server (`Lambda+LocalServer`).
The new layout looks like this:
```text
Sources
├── AWSLambdaRuntime
│ ├── FoundationSupport
│ │ ├── Context+Foundation.swift
│ │ ├── Lambda+JSON.swift
│ │ └── Vendored
│ │ ├── ByteBuffer-foundation.swift
│ │ └── JSON+ByteBuffer.swift
│ ├── HTTPClient
│ │ ├── ControlPlaneRequest.swift
│ │ ├── ControlPlaneRequestEncoder.swift
│ │ ├── LambdaRuntimeClient+ChannelHandler.swift
│ │ ├── LambdaRuntimeClient.swift
│ │ └── LambdaRuntimeClientProtocol.swift
│ ├── HTTPServer
│ │ ├── Lambda+LocalServer+Pool.swift
│ │ └── Lambda+LocalServer.swift
│ ├── Lambda.swift
│ ├── LambdaClock.swift
│ ├── LambdaContext.swift
│ ├── LambdaRequestID.swift
│ ├── LambdaResponseStreamWriter+Headers.swift
│ ├── LambdaRuntimeError.swift
│ ├── Runtime
│ │ ├── LambdaHandlers.swift
│ │ ├── LambdaRuntime+Codable.swift
│ │ ├── LambdaRuntime+Handler.swift
│ │ ├── LambdaRuntime+ServiceLifecycle.swift
│ │ └── LambdaRuntime.swift
│ ├── SendableMetatype.swift
│ ├── Utils.swift
│ └── Version.swift
└── MockServer
└── MockHTTPServer.swift
```
|
||
|
|
1f0888ee7b |
Fix after release of swift-log 1.8.0 (#619)
<!--- Provide a general summary of your changes in the Title above --> Fix after release of swift-log 1.8.0 ## Issue \# <!--- If it fixes an issue, please link to the issue here --> ## Description of changes <!--- Why is this change required? What problem does it solve? --> ## New/existing dependencies impact assessment, if applicable <!--- No new dependencies were added to this change. --> <!--- If any dependency was added / modified / removed, THIRD-PARTY-LICENSES must be updated accordingly. --> ## Conventional Commits <!--- Please use conventional commits to let us know what kind of change this is.--> <!--- More info can be found here: https://www.conventionalcommits.org/en/v1.0.0/--> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.2.4.1 |
||
|
|
4494361efb |
Fix dependency on HB example (#618)
The Hummingbird-Lambda exports the Swift AWS Lambda Runtime. Therefore, the sample project doesn't need to declare the runtime as a dependency. |
||
|
|
72865e405a |
Update commented deps in examples to use runtime v2 (#616)
Fix example dependencies Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
3ddd64087d |
Add Streaming Lambda Examples with API Gateway and Function URL (#615)
## Overview This PR reorganizes and enhances the streaming Lambda examples by splitting them into two distinct examples that demonstrate different invocation methods: 1. **Streaming+FunctionUrl** - Streaming responses via Lambda Function URLs 2. **Streaming+APIGateway** - Streaming responses via API Gateway REST API ## Changes ### 🔄 Restructured Examples - **Renamed**: `Examples/Streaming/` → `Examples/Streaming+FunctionUrl/` - Maintains the original streaming example using Lambda Function URLs - Updated documentation to clarify Function URL-specific configuration - Improved AWS credentials handling in curl examples - **New**: `Examples/Streaming+APIGateway/` - Comprehensive example demonstrating API Gateway REST API with response streaming - Complete SAM template with proper IAM roles and streaming configuration - Detailed documentation covering API Gateway-specific setup ### 📚 Documentation Improvements #### Streaming+FunctionUrl - Clarified that this example uses Lambda Function URLs - Updated curl examples to use `eval $(aws configure export-credentials --format env)` for cleaner credential handling - Maintained all existing functionality and deployment instructions #### Streaming+APIGateway (New) - **316-line comprehensive README** covering: - Response streaming concepts and benefits - HTTP status code and header configuration - Streaming response body patterns - Local testing instructions - Complete SAM deployment guide with detailed template explanation - API Gateway-specific invocation with AWS Sigv4 authentication - Payload format documentation with example JSON - Security and reliability best practices - How API Gateway streaming works under the hood ### 🛠️ Technical Details #### API Gateway Streaming Configuration The new example demonstrates: - Special Lambda URI: `/response-streaming-invocations` endpoint - `responseTransferMode: STREAM` configuration - IAM role with both `lambda:InvokeFunction` and `lambda:InvokeWithResponseStream` permissions - Proper timeout configuration (60s) to accommodate streaming duration #### SAM Template Features ```yaml - Lambda function with streaming support (arm64, provided.al2) - API Gateway REST API with OpenAPI 3.0 definition - IAM execution role for API Gateway to invoke Lambda with streaming - Complete outputs for easy testing (API URL and Lambda ARN) ``` ### 🔐 Security Enhancements Both examples now include comprehensive security best practices: - API Gateway access logging - Throttling configuration - AWS WAF integration recommendations - Lambda concurrent execution limits - Environment variable encryption - Dead Letter Queue (DLQ) configuration - VPC configuration guidance ### 🧪 Testing Both examples support: - **Local testing**: `swift run` with curl invocation on port 7000 - **AWS deployment**: Complete SAM templates with deployment instructions - **Authenticated invocation**: AWS Sigv4 examples with proper credential handling ## Benefits 1. **Clearer separation**: Developers can now easily choose between Function URLs and API Gateway based on their use case 2. **Better documentation**: Each example has tailored documentation for its specific invocation method 3. **Production-ready**: Includes security best practices and proper IAM configuration 4. **Easier testing**: Improved credential handling in curl examples ## Breaking Changes None - this is purely additive. The original streaming example is preserved as `Streaming+FunctionUrl`. ## Testing Checklist - [x] Local testing works for both examples - [x] SAM deployment templates are valid - [x] Documentation is comprehensive and accurate - [x] Security best practices are documented - [x] Curl examples work with proper authentication ## Related Documentation - [AWS Lambda Response Streaming](https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html) - [API Gateway Lambda Proxy Integration with Streaming](https://docs.aws.amazon.com/apigateway/latest/developerguide/response-streaming-lambda-configure.html) - [Lambda Function URLs](https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html) EOF --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
a590d08818 |
Use Swiftlang's github action for unit tests (#614)
Remove a dependency on Swift NIO's GitHub workflows and use Swiftlang's github action for unit tests instead --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
9f9434bfa4 |
Use Swiftlang's GitHUb workflow for testing with Static SDK (#613)
Use Swiftlang's GitHub workflow script to test with the static SDK --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
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> |
||
|
|
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> |
||
|
|
437835530a |
fix #609 : [plugin] Update the README and the doc to mention potential credentials error when using the plugin. (#610)
## Description Adds documentation for Docker credential store errors that users may encounter when running `swift package archive --allow-network-connections docker`. ## Changes - Added a note in `readme.md` explaining how to resolve Docker credential store errors - Added a note in `Sources/AWSLambdaRuntime/Docs.docc/Deployment.md` with the same guidance ## Problem Users may encounter authentication errors when the Swift package plugin attempts to pull Docker images, particularly when Docker is configured with a credential store (e.g., `docker-credential-desktop`). This issue is documented in #609. ## Solution The documentation now provides two workarounds: 1. Remove the `credsStore` entry from `~/.docker/config.json` 2. Use the `--disable-sandbox` flag with the archive command Both notes link to issue #609 for additional context and discussion. ## Related Issue Fixes #609 |
||
|
|
2abe7eb7de |
Add support for Lambda Tenants (#608)
Address https://github.com/awslabs/swift-aws-lambda-runtime/issues/605 NEW Lambda Tenant isolation capability: https://docs.aws.amazon.com/lambda/latest/dg/tenant-isolation.html # Add Support for Lambda Tenant Isolation Mode ## Summary This PR adds support for AWS Lambda's tenant isolation mode to the Swift AWS Lambda Runtime, enabling developers to build multi-tenant applications with strict execution environment isolation per tenant. ## Changes ### Runtime Support - Added `tenantID` property to `LambdaContext` to expose the tenant identifier - Extended `InvocationMetadata` to capture the `Lambda-Runtime-Aws-Tenant-Id` header - Added `AmazonHeaders.tenantID` constant for the tenant ID header - Added trace logging for invocation headers to aid debugging ### New Example: MultiTenant A complete working example demonstrating tenant isolation mode: - **Request tracking system** that maintains separate counters and histories per tenant - **Actor-based storage** (`TenantDataStore`) for thread-safe tenant data management - **Immutable data structures** (`TenantData`) following Swift best practices - **API Gateway integration** with tenant ID passed via query parameter - **SAM template** configured with `TenancyConfig.TenantIsolationMode: PER_TENANT` - **Comprehensive documentation** covering architecture, deployment, testing, and best practices ### Testing - Added unit test for tenant ID extraction from invocation headers - Integrated MultiTenant example into CI/CD pipeline ### Documentation The example includes detailed documentation on: - When to use tenant isolation (user code execution, sensitive data processing) - How tenant isolation works (dedicated environments, no cross-tenant reuse) - Concurrency limits and scaling considerations - Pricing implications - Security best practices - CloudWatch monitoring with tenant dimensions ## Files Changed - `Sources/AWSLambdaRuntime/LambdaContext.swift` - Added tenantID property - `Sources/AWSLambdaRuntime/ControlPlaneRequest.swift` - Capture tenant ID from headers - `Sources/AWSLambdaRuntime/Utils.swift` - Added tenantID header constant - `Sources/AWSLambdaRuntime/Lambda.swift` - Pass tenant ID to context - `Sources/AWSLambdaRuntime/LambdaRuntimeClient+ChannelHandler.swift` - Added trace logging - `Tests/AWSLambdaRuntimeTests/InvocationTests.swift` - Added tenant ID test - `Examples/MultiTenant/*` - New complete example with SAM template - `.github/workflows/pull_request.yml` - Added MultiTenant to CI pipeline ## Testing Instructions 1. Build and deploy the example: bash cd Examples/MultiTenant swift package archive --allow-network-connections docker sam deploy --guided 2. Test with different tenants: bash curl "https://<api-id>.execute-api.<region>.amazonaws.com/Prod?tenant-id= alice" curl "https://<api-id>.execute-api.<region>.amazonaws.com/Prod?tenant-id= bob" 3. Verify isolation by checking that each tenant maintains separate request counts ## Related Documentation - [AWS Lambda Tenant Isolation](https://docs.aws.amazon.com/lambda/latest/dg/tenant-isolation.html) - [AWS Blog: Streamlined Multi-Tenant Application Development](https://aws.amazon.com/blogs/aws/streamlined-multi-tenant-application-development-with-tenant-isolation-mode-in-aws-lambda/) --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>2.4.0 |
||
|
|
0305cb31b8 |
Add scripts to measure cold start performance (#604)
I added two shell scripts under `scripts/lambda-performance` to help measure Lambda cold and warm start time. Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |
||
|
|
85bd29e4de |
Makes performance script run on macOS (#603)
By default, the script started the MockServer on port 7000, which is used by AirPlay on macOS. This caused conflicts. I also made a minor change on the logging to avoir reporting an error when the server closes the connection. |
||
|
|
1b3c81c51f |
Add Swift ServiceLifecycle section to the readme (#601)
Add Swift ServiceLifecycle section to the readme --------- Co-authored-by: Sebastien Stormacq <stormacq@amazon.lu> |