Files
swift-aws-lambda-runtime/Examples
dependabot[bot] 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>
2026-03-01 10:54:25 +01:00
..

This directory contains example code for Lambda functions.

Pre-requisites

Examples

AWS Credentials and Signature

This section is a short tutorial on the AWS Signature protocol and the AWS credentials.

What is AWS SigV4?

AWS SigV4, short for "Signature Version 4," is a protocol AWS uses to authenticate and secure requests. When you, as a developer, send a request to an AWS service, AWS SigV4 makes sure the request is verified and hasnt been tampered with. This is done through a digital signature, which is created by combining your request details with your secret AWS credentials. This signature tells AWS that the request is genuine and is coming from a user who has the right permissions.

How to Obtain AWS Access Keys and Session Tokens

To start making authenticated requests with AWS SigV4, youll need three main pieces of information:

  1. Access Key ID: This is a unique identifier for your AWS account, IAM (Identity and Access Management) user, or federated user.

  2. Secret Access Key: This is a secret code that only you and AWS know. It works together with your access key ID to sign requests.

  3. Session Token (Optional): If you're using temporary security credentials, AWS will also provide a session token. This is usually required if you're using temporary access (e.g., through AWS STS, which provides short-lived, temporary credentials, or for federated users).

To obtain these keys, you need an AWS account:

  1. Sign up or Log in to AWS Console: Go to the AWS Management Console, log in, or create an AWS account if you dont have one.

  2. Create IAM User: In the console, go to IAM (Identity and Access Management) and create a new user. Ensure you set permissions that match what the user will need for your application (e.g., permissions to access specific AWS services, such as AWS Lambda).

  3. Generate Access Key and Secret Access Key: In the IAM user credentials section, find the option to generate an "Access Key" and "Secret Access Key." Save these securely! Youll need them to authenticate your requests.

  4. (Optional) Generate Temporary Security Credentials: If youre using temporary credentials (which are more secure for short-term access), use AWS Security Token Service (STS). You can call the GetSessionToken or AssumeRole API to generate temporary credentials, including a session token.

With these in hand, you can use AWS SigV4 to securely sign your requests and interact with AWS services from your Swift app.

⚠️ Security and Reliability Notice

These are example applications for demonstration purposes. When deploying such infrastructure in production environments, we strongly encourage you to follow these best practices for improved security and resiliency: