Skip to content

Commit e203b69

Browse files
[examples] Sync SDK examples from awsdocs/aws-doc-sdk-examples
Includes commit(s): 6a5af5c0dc35de568020851a01e70b207343cc4a Co-authored-by: David Souther <[email protected]>
1 parent d461d85 commit e203b69

File tree

7 files changed

+69
-11
lines changed

7 files changed

+69
-11
lines changed

examples/examples/bedrock-runtime/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ edition = "2021"
66
publish = false
77

88
[dependencies]
9+
aws-config = { version = "1.5.6", path = "../../../sdk/aws-config" }
10+
aws-sdk-bedrockruntime = { version = "1.50.0", path = "../../../sdk/bedrockruntime" }
11+
aws-smithy-runtime-api = { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
12+
aws-smithy-types = { version = "1.2.6", path = "../../../sdk/aws-smithy-types" }
913
reqwest = "0.12.5"
1014
serde = "1.0.204"
1115
serde_json = "1.0.120"
1216
tracing = "0.1.40"
1317
tracing-subscriber = "0.3.18"
14-
aws-config= { version = "1.5.6", path = "../../../sdk/aws-config" }
15-
aws-sdk-bedrockruntime= { version = "1.50.0", path = "../../../sdk/bedrockruntime" }
16-
aws-smithy-runtime-api= { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
17-
aws-smithy-types= { version = "1.2.6", path = "../../../sdk/aws-smithy-types" }
1818

1919
[dependencies.tokio]
2020
version = "1.38.1"

examples/examples/cloudwatchlogs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ path = "../../test-utils"
3232
version = "0.1.0"
3333

3434
[dev-dependencies]
35-
aws-smithy-mocks-experimental= { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
35+
aws-smithy-mocks-experimental = { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }

examples/examples/ec2/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ publish = false
88

99
[dependencies]
1010
tracing = "0.1.40"
11+
aws-smithy-runtime-api = { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
1112
mockall = "0.13.0"
1213
inquire = "0.7.5"
1314
reqwest = "0.12.5"
14-
aws-smithy-runtime-api= { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
15-
aws-sdk-ssm= { version = "1.48.0", path = "../../../sdk/ssm" }
16-
aws-smithy-async= { version = "1.2.1", path = "../../../sdk/aws-smithy-async" }
15+
aws-sdk-ssm = { version = "1.48.0", path = "../../../sdk/ssm" }
16+
aws-smithy-async = { version = "1.2.1", path = "../../../sdk/aws-smithy-async" }
1717
aws-config= { version = "1.5.6", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] }
1818
aws-sdk-ec2= { version = "1.74.0", path = "../../../sdk/ec2" }
1919
aws-types= { version = "1.3.3", path = "../../../sdk/aws-types" }

examples/examples/lambda/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Shows how to use the AWS SDK for Rust to work with AWS Lambda.
66

77
<!--custom.overview.start-->
8+
For an example of using Rust in a lambda function, see [this example](../../lambda).
89
<!--custom.overview.end-->
910

1011
_Lambda allows you to run code without provisioning or managing servers._

examples/examples/ses/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ publish = false
1010
anyhow = "1.0.81"
1111
tracing = "0.1.40"
1212
tmpfile = "0.0.2"
13+
aws-smithy-http = { version = "0.60.11", path = "../../../sdk/aws-smithy-http" }
14+
aws-smithy-mocks-experimental = { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
1315
open = "5.1.2"
14-
aws-smithy-http= { version = "0.60.11", path = "../../../sdk/aws-smithy-http" }
15-
aws-smithy-mocks-experimental= { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
1616
aws-config= { version = "1.5.6", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] }
1717
aws-sdk-sesv2= { version = "1.46.0", path = "../../../sdk/sesv2", features = ["test-util"] }
1818

examples/lambda/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Rust Lambda Function
2+
3+
## Overview
4+
5+
This example shows how to use Rust in a lambda function.
6+
_Lambda allows you to run code without provisioning or managing servers._
7+
8+
## ⚠ Important
9+
10+
* 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/).
11+
* Running the tests might result in charges to your AWS account.
12+
* 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).
13+
* 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).
14+
15+
<!--custom.important.start-->
16+
<!--custom.important.end-->
17+
18+
## Code examples
19+
20+
### Prerequisites
21+
22+
For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv1` folder.
23+
24+
25+
<!--custom.prerequisites.start-->
26+
27+
Additionally, to compile Lambda functions written in the Rust programming language, use [Cargo Lambda](https://www.cargo-lambda.info/).
28+
29+
<!--custom.prerequisites.end-->
30+
31+
32+
### Tests
33+
34+
⚠ Running tests might result in charges to your AWS account.
35+
36+
37+
To find instructions for running these tests, see the [README](../../README.md#Tests)
38+
in the `rustv1` folder.
39+
40+
41+
42+
<!--custom.tests.start-->
43+
<!--custom.tests.end-->
44+
45+
## Additional resources
46+
47+
- [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
48+
- [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html)
49+
<!--custom.resources.start-->
50+
- [Cargo Lambda](https://cargo-lambda.info)
51+
<!--custom.resources.end-->
52+
53+
---
54+
55+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
56+
57+
SPDX-License-Identifier: Apache-2.0

versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
smithy_rs_revision = 'e96640bd33df40026447b9e3f826144f8e3c7724'
2-
aws_doc_sdk_examples_revision = '054d2fbdcb039d077615ce17e5b66ed92e8a33d1'
2+
aws_doc_sdk_examples_revision = '6a5af5c0dc35de568020851a01e70b207343cc4a'
33

44
[manual_interventions]
55
crates_to_remove = []

0 commit comments

Comments
 (0)