Skip to content

Add Basic Concurrent Example for S3#1119

Open
darklight3it wants to merge 1 commit intomainfrom
dmelfi/add-s3-concurrent-example
Open

Add Basic Concurrent Example for S3#1119
darklight3it wants to merge 1 commit intomainfrom
dmelfi/add-s3-concurrent-example

Conversation

@darklight3it
Copy link
Contributor

📬 Issue #, if available:

✍️ Description of changes:

Adding a basic concurrent example for S3 call case.

🔏 By submitting this pull request

  • I confirm that I've ran cargo +nightly fmt.
  • I confirm that I've ran cargo clippy --fix.
  • I confirm that I've made a best effort attempt to update all relevant documentation.
  • [x ] I confirm that my contribution is made under the terms of the Apache 2.0 license.

@darklight3it darklight3it self-assigned this Mar 11, 2026
Copy link
Collaborator

@jlizen jlizen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

might also be nice to have a more generalized 'shared state' example that has eg:

struct SharedState {
    my_expensive_to_clone_value: T,
    another_expensive_to_clone_value: T
}

async fn main {
...

let state = Arc::new( SharedState { .. });

 lambda_runtime::run_concurrent(service_fn(move |event: LambdaEvent<Request>| {
   let state = state.clone();
   async move {
       ..
   }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants