Skip to content

Instantly share code, notes, and snippets.

@BrianKopp
Last active June 7, 2020 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianKopp/801046c303c5ea5bef7f6af8462d9702 to your computer and use it in GitHub Desktop.
Save BrianKopp/801046c303c5ea5bef7f6af8462d9702 to your computer and use it in GitHub Desktop.
RustRusotoRocket_DynamoUserCrudNew
use rusoto_core::Region;
use rusoto_dynamodb::DynamoDbClient;
impl DynamoUserCrud {
fn new(local: bool) -> DynamoDbClient {
let region = match local {
false => Region::UsEast1,
true => Region::Custom {
name: "us-east-1".to_owned(),
endpoint: "http://localhost:4566".to_owned()
}
}
DynamoDbClient::new(region)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment