From 64228457398f314cbace3897c87e0210a2301d50 Mon Sep 17 00:00:00 2001 From: David Souther Date: Fri, 20 Sep 2024 11:44:06 -0700 Subject: [PATCH 1/4] Rust: Create README.md for Lambda Function example --- rustv1/lambda/README.md | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 rustv1/lambda/README.md diff --git a/rustv1/lambda/README.md b/rustv1/lambda/README.md new file mode 100644 index 00000000000..705fa20af9b --- /dev/null +++ b/rustv1/lambda/README.md @@ -0,0 +1,57 @@ +# Rust Lambda Function + +## Overview + +This example shows how to use Rust in a lambda function. +_Lambda allows you to run code without provisioning or managing servers._ + +## ⚠ Important + +* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/). +* Running the tests might result in charges to your AWS account. +* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). +* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). + + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv1` folder. + + + + +Additionally, to compile Lambda functions written in the Rust programming language, use [Cargo Lambda](https://www.cargo-lambda.info/). + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `rustv1` folder. + + + + + + +## Additional resources + +- [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +- [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) + +- [Cargo Lambda](https://cargo-lambda.info) + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 From 3660968730f5ff3166e12fa42df01e8d2578ce3a Mon Sep 17 00:00:00 2001 From: David Souther Date: Fri, 20 Sep 2024 11:49:04 -0700 Subject: [PATCH 2/4] Update lambda SDK example README.md with link to Function example. --- rustv1/examples/lambda/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rustv1/examples/lambda/README.md b/rustv1/examples/lambda/README.md index c409803e70e..abcc3f0b563 100644 --- a/rustv1/examples/lambda/README.md +++ b/rustv1/examples/lambda/README.md @@ -5,6 +5,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Lambda. +For an example of using Rust in a lambda function, see [this example](../../lambda). _Lambda allows you to run code without provisioning or managing servers._ @@ -127,4 +128,4 @@ in the `rustv1` folder. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 \ No newline at end of file +SPDX-License-Identifier: Apache-2.0 From 81ab5eaf61afd34a69ea7334d96ab13a72b8403b Mon Sep 17 00:00:00 2001 From: David Souther Date: Fri, 20 Sep 2024 12:00:58 -0700 Subject: [PATCH 3/4] Update README.md From 4cd2b552aa70d9dcc11ebaabd66deb15014f39af Mon Sep 17 00:00:00 2001 From: David Souther Date: Fri, 20 Sep 2024 15:02:50 -0400 Subject: [PATCH 4/4] remove trailing newline --- rustv1/examples/lambda/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustv1/examples/lambda/README.md b/rustv1/examples/lambda/README.md index abcc3f0b563..629c38c20eb 100644 --- a/rustv1/examples/lambda/README.md +++ b/rustv1/examples/lambda/README.md @@ -128,4 +128,4 @@ in the `rustv1` folder. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file