Skip to content

Commit

Permalink
[examples] Sync SDK examples from awsdocs/aws-doc-sdk-examples
Browse files Browse the repository at this point in the history
Includes commit(s):
  6a5af5c0dc35de568020851a01e70b207343cc4a

Co-authored-by: David Souther <davidsouther+github@gmail.com>
  • Loading branch information
aws-sdk-rust-ci and DavidSouther committed Sep 23, 2024
1 parent d461d85 commit e203b69
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 11 deletions.
8 changes: 4 additions & 4 deletions examples/examples/bedrock-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ edition = "2021"
publish = false

[dependencies]
aws-config = { version = "1.5.6", path = "../../../sdk/aws-config" }
aws-sdk-bedrockruntime = { version = "1.50.0", path = "../../../sdk/bedrockruntime" }
aws-smithy-runtime-api = { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
aws-smithy-types = { version = "1.2.6", path = "../../../sdk/aws-smithy-types" }
reqwest = "0.12.5"
serde = "1.0.204"
serde_json = "1.0.120"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
aws-config= { version = "1.5.6", path = "../../../sdk/aws-config" }
aws-sdk-bedrockruntime= { version = "1.50.0", path = "../../../sdk/bedrockruntime" }
aws-smithy-runtime-api= { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
aws-smithy-types= { version = "1.2.6", path = "../../../sdk/aws-smithy-types" }

[dependencies.tokio]
version = "1.38.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/examples/cloudwatchlogs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ path = "../../test-utils"
version = "0.1.0"

[dev-dependencies]
aws-smithy-mocks-experimental= { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
aws-smithy-mocks-experimental = { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
6 changes: 3 additions & 3 deletions examples/examples/ec2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ publish = false

[dependencies]
tracing = "0.1.40"
aws-smithy-runtime-api = { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
mockall = "0.13.0"
inquire = "0.7.5"
reqwest = "0.12.5"
aws-smithy-runtime-api= { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" }
aws-sdk-ssm= { version = "1.48.0", path = "../../../sdk/ssm" }
aws-smithy-async= { version = "1.2.1", path = "../../../sdk/aws-smithy-async" }
aws-sdk-ssm = { version = "1.48.0", path = "../../../sdk/ssm" }
aws-smithy-async = { version = "1.2.1", path = "../../../sdk/aws-smithy-async" }
aws-config= { version = "1.5.6", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] }
aws-sdk-ec2= { version = "1.74.0", path = "../../../sdk/ec2" }
aws-types= { version = "1.3.3", path = "../../../sdk/aws-types" }
Expand Down
1 change: 1 addition & 0 deletions examples/examples/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Shows how to use the AWS SDK for Rust to work with AWS Lambda.

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

_Lambda allows you to run code without provisioning or managing servers._
Expand Down
4 changes: 2 additions & 2 deletions examples/examples/ses/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ publish = false
anyhow = "1.0.81"
tracing = "0.1.40"
tmpfile = "0.0.2"
aws-smithy-http = { version = "0.60.11", path = "../../../sdk/aws-smithy-http" }
aws-smithy-mocks-experimental = { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
open = "5.1.2"
aws-smithy-http= { version = "0.60.11", path = "../../../sdk/aws-smithy-http" }
aws-smithy-mocks-experimental= { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" }
aws-config= { version = "1.5.6", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] }
aws-sdk-sesv2= { version = "1.46.0", path = "../../../sdk/sesv2", features = ["test-util"] }

Expand Down
57 changes: 57 additions & 0 deletions examples/lambda/README.md
Original file line number Diff line number Diff line change
@@ -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).

<!--custom.important.start-->
<!--custom.important.end-->

## Code examples

### Prerequisites

For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv1` folder.


<!--custom.prerequisites.start-->

Additionally, to compile Lambda functions written in the Rust programming language, use [Cargo Lambda](https://www.cargo-lambda.info/).

<!--custom.prerequisites.end-->


### 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.



<!--custom.tests.start-->
<!--custom.tests.end-->

## 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)
<!--custom.resources.start-->
- [Cargo Lambda](https://cargo-lambda.info)
<!--custom.resources.end-->

---

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
2 changes: 1 addition & 1 deletion versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
smithy_rs_revision = 'e96640bd33df40026447b9e3f826144f8e3c7724'
aws_doc_sdk_examples_revision = '054d2fbdcb039d077615ce17e5b66ed92e8a33d1'
aws_doc_sdk_examples_revision = '6a5af5c0dc35de568020851a01e70b207343cc4a'

[manual_interventions]
crates_to_remove = []
Expand Down

0 comments on commit e203b69

Please sign in to comment.