Skip to content

Commit b927092

Browse files
authored
Update all dependencies and fix examples (#959)
* add copy/clone trait impl * update all deps and fix examples * remove unused deps * add feature flag for aws-config * update axum * revert derive * update * remove ';' * use aws_config::load_from_env().await; * remove comments * revert * rev * rev * bump ex * update * update ureq * space * fmt * clippy * update otel * fmt
1 parent 0383301 commit b927092

File tree

71 files changed

+211
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+211
-296
lines changed

examples/advanced-appconfig-feature-flags/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ edition = "2021"
1515
# and it will keep the alphabetic ordering for you.
1616

1717
[dependencies]
18-
async-trait = "0.1.68"
19-
lambda_runtime = "0.13"
20-
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
18+
async-trait = "0.1.88"
19+
lambda_runtime = { path = "../../lambda-runtime" }
20+
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
2121
serde = { version = "1.0", features = ["derive"] }
2222
serde_json = "1.0"
23-
thiserror = "1.0"
23+
thiserror = "2.0"
2424
tokio = { version = "1", features = ["macros"] }

examples/advanced-appconfig-feature-flags/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ async fn function_handler<T: ConfigurationFetcher + Send + Sync>(
3535

3636
// Use the feature flag
3737
let msg = if config.spanish_response {
38-
format!("{}, in spanish.", quote)
38+
format!("{quote}, in spanish.")
3939
} else {
40-
format!("{}.", quote)
40+
format!("{quote}.")
4141
};
4242

4343
// Return `Response` (it will be serialized to JSON automatically by the runtime)

examples/advanced-sqs-multiple-functions-shared-data/consumer/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
#aws dependencies
8-
aws-sdk-config = "0.35.0"
9-
aws-sdk-sqs = "0.35.0"
10-
aws_lambda_events = { version = "0.11.1", features = ["sqs"], default-features = false }
8+
aws_lambda_events = { path = "../../../lambda-events", features = ["sqs"], default-features = false }
119

1210
#lambda runtime
1311
lambda_runtime = { path = "../../../lambda-runtime" }

examples/advanced-sqs-multiple-functions-shared-data/pizza_lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
serde = { version = "1.0.191", features = ["derive"] }
7+
serde = { version = "1.0.219", features = ["derive"] }

examples/advanced-sqs-multiple-functions-shared-data/producer/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ env = { "QUEUE_URL" = "https://changeMe" }
88

99
[dependencies]
1010
#aws dependencies
11-
aws-config = "0.57.1"
12-
aws-sdk-config = "0.35.0"
13-
aws-sdk-sqs = "0.35.0"
11+
aws-config = { version = "1.8.1", features = ["behavior-version-latest"] }
12+
aws-sdk-sqs = "1.74.0"
1413

1514
#lambda runtime
1615
lambda_runtime = { path = "../../../lambda-runtime" }
17-
serde_json = "1.0.108"
16+
serde_json = "1.0.140"
1817
tokio = { version = "1", features = ["macros"] }
1918

2019
#shared lib
21-
pizza_lib = { path = "../pizza_lib" }
20+
pizza_lib = { path = "../pizza_lib" }

examples/advanced-sqs-multiple-functions-shared-data/producer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async fn main() -> Result<(), Error> {
2020
// read the queue url from the environment
2121
let queue_url = std::env::var("QUEUE_URL").expect("could not read QUEUE_URL");
2222
// build the config from environment variables (fed by AWS Lambda)
23-
let config = aws_config::from_env().load().await;
23+
let config = aws_config::load_from_env().await;
2424
// create our SQS Manager
2525
let sqs_manager = SQSManager::new(aws_sdk_sqs::Client::new(&config), queue_url);
2626
let sqs_manager_ref = &sqs_manager;

examples/advanced-sqs-partial-batch-failures/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ edition = "2021"
55

66
[dependencies]
77
serde = "^1"
8-
serde_derive = "^1"
9-
serde_with = { version = "^2", features = ["json"], optional = true }
108
serde_json = "^1"
119
aws_lambda_events = { path = "../../lambda-events" }
1210
lambda_runtime = { path = "../../lambda-runtime" }

examples/advanced-sqs-partial-batch-failures/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ where
5555
D: DeserializeOwned,
5656
R: Future<Output = Result<(), Error>>,
5757
{
58-
run(service_fn(|e| batch_handler(|d| f(d), e))).await
58+
run(service_fn(|e| batch_handler(&f, e))).await
5959
}
6060

6161
/// Helper function to lift the user provided `f` function from message to batch of messages.
@@ -123,7 +123,7 @@ mod test {
123123
}
124124

125125
#[tokio::test]
126-
async fn test() -> () {
126+
async fn test() {
127127
let msg_to_fail: SqsMessageObj<serde_json::Value> = serde_json::from_str(
128128
r#"{
129129
"messageId": "1",

examples/basic-cognito-post-confirmation/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ edition = "2021"
1515
# and it will keep the alphabetic ordering for you.
1616

1717
[dependencies]
18-
aws-config = "1.5.0"
19-
aws-sdk-ses = "1.28.0"
18+
aws-config = { version = "1.8.1", features = ["behavior-version-latest"] }
19+
aws-sdk-ses = "1.77.0"
2020
aws_lambda_events = { path = "../../lambda-events", default-features = false, features = ["cognito"] }
2121

2222
lambda_runtime = { path = "../../lambda-runtime" }

examples/basic-error-error-crates-integration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ edition = "2021"
77
anyhow = "1"
88
eyre = "0.6.12"
99
lambda_runtime = { path = "../../lambda-runtime", features = ["anyhow", "eyre", "miette"] }
10-
miette = "7.2.0"
10+
miette = "7.6.0"
1111
serde = "1"
1212
tokio = { version = "1", features = ["macros"] }

0 commit comments

Comments
 (0)