Skip to content

Commit 0375b18

Browse files
authored
Fix outdated Lambda samples (#402)
1 parent b46e96d commit 0375b18

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

src/content/docs/aws/services/lambda.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,12 @@ However, the new provider still supports the following configuration options:
632632

633633
The following code snippets and sample applications provide practical examples of how to use Lambda in LocalStack for various use cases:
634634

635+
- [Lambda Debugging][/aws/tooling/lambda-tools/remote-debugging] demonstrates how to remotely debug a Lambda function from within your IDE.
636+
- [Debug your Python Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-python)
637+
- [Debug your JavaScript Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-javascript)
638+
- [Debug your TypeScript Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-typescript)
639+
- [Debug your Java Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-java)
635640
- [Lambda Hot Reloading](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-hot-reloading) shows how to use hot reloading to update function code and layers without having to redeploy them.
636-
- [Lambda Code Mounting and Debugging](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-mounting-and-debugging) demonstrates how to debug Lambda functions locally using code mounting.
637641
- [Lambda Function URL](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-function-urls-javascript) shows how to use HTTP to invoke a Lambda function via its Function URL.
638642
- [Lambda Layers](https://github.com/localstack/localstack-pro-samples/blob/master/serverless-lambda-layers) demonstrates how to use Lambda layers, which are reusable packages of code that can be shared across multiple functions.
639643
- [Lambda PHP/Bref](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-php-bref-cdk-app) shows how to use PHP/Bref with and without fpm, using the Serverless framework and AWS CDK.

src/content/docs/aws/tooling/lambda-tools/hot-reloading.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,6 @@ Changes to your Lambda code locally will be reflected immediately upon saving.
721721

722722
![Setting Hot Reload on Web App](/images/aws/hot-reload-lambda-web-app.png)
723723

724-
## Useful Links
724+
## Examples
725725

726-
* [Lambda Code Mounting and Debugging (Python)](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-mounting-and-debugging)
727-
* [Spring Cloud Function on LocalStack (Kotlin JVM)](https://github.com/localstack/localstack-pro-samples/tree/master/sample-archive/spring-cloud-function-microservice)
726+
- [Lambda Hot Reloading](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-hot-reloading)

src/content/docs/aws/tooling/lambda-tools/remote-debugging.mdx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ Lambda Remote Debugging lets you use breakpoints, inspect variables, and step th
1616

1717
:::note
1818

19-
For examples and sample apps, visit the [LocalStack Samples Repository](https://github.com/localstack-samples/localstack-pro-samples).
19+
For examples and sample apps, visit the [LocalStack Samples Repository](https://github.com/localstack-samples/localstack-pro-samples):
20+
21+
- [Debug your Python Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-python)
22+
- [Debug your JavaScript Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-javascript)
23+
- [Debug your TypeScript Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-typescript)
24+
- [Debug your Java Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-java)
2025

2126
:::
2227

@@ -311,7 +316,6 @@ functions:
311316
* [Debugging Python Lambda functions](#debugging-python-lambda-functions)
312317
* [Debugging JVM Lambda functions](#debugging-jvm-lambda-functions)
313318
* [Debugging Node.js Lambda functions](#debugging-nodejs-lambda-functions)
314-
* [Resources](#resources)
315319

316320
:::note
317321

@@ -328,10 +332,6 @@ LocalStack changes that
328332
with the same local code mounting functionality that also helps you
329333
to [iterate quickly over your function code](/aws/tooling/lambda-tools/hot-reloading).
330334

331-
For a simple working example of this feature, you can refer to
332-
[our samples](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-mounting-and-debugging).
333-
There, the necessary code fragments for enabling debugging are already present.
334-
335335
### Debugging a Python Lambda in Visual Studio Code
336336

337337
#### Configure LocalStack for VS Code remote Python debugging
@@ -476,13 +476,13 @@ To create the Lambda function, you just need to take care of two things:
476476
2. Set the S3 key to the path of the directory your lambda function resides in.
477477
The handler is then referenced by the filename of your lambda code and the function in that code that should be invoked.
478478

479-
So, in our [example](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-mounting-and-debugging), this would be:
479+
Using the AWS CLI, this would be:
480480

481481
```bash
482482
awslocal lambda create-function --function-name my-cool-local-function \
483483
--code S3Bucket="hot-reload",S3Key="$(pwd)/" \
484484
--handler handler.handler \
485-
--runtime python3.8 \
485+
--runtime python3.13 \
486486
--timeout 150 \
487487
--role arn:aws:iam::000000000000:role/lambda-role
488488
```
@@ -719,11 +719,9 @@ awslocal lambda invoke --function-name func1 \
719719
</Tabs>
720720

721721

722-
## Resources
722+
## Examples
723723

724-
* [Lambda Code Mounting and Debugging (Python)](https://github.com/localstack/localstack-pro-samples/tree/master/lambda-mounting-and-debugging)
725-
* [Spring Cloud Function on LocalStack (Kotlin JVM)](https://github.com/localstack/localstack-pro-samples/tree/master/sample-archive/spring-cloud-function-microservice)
726-
* [Enable Lambda Debug Mode to Automatically Raise Execution Timeouts (Java)](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debug-mode/java/base-enable-lambda-debug-mode)
727-
* [Enable Lambda Debug Mode to Automatically Raise Execution Timeouts (Python)](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debug-mode/python/base-multiple-lambda-debug-mode)
728-
* [Enable Lambda Debug Mode to Automatically Raise Execution Timeouts for multiple Lambda functions (Python)](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debug-mode/python/base-multiple-lambda-debug-mode)
729-
* [Enable Lambda Debug Mode to Automatically Handle Concurrent Function Invocations (Python)](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debug-mode/python/base-concurrent-lambda-debug-mode)
724+
- [Debug your Python Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-python)
725+
- [Debug your JavaScript Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-javascript)
726+
- [Debug your TypeScript Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-typescript)
727+
- [Debug your Java Lambda Function](https://github.com/localstack-samples/localstack-pro-samples/tree/master/lambda-debugging-sam-java)

0 commit comments

Comments
 (0)