Last active
June 7, 2020 14:31
-
-
Save BrianKopp/801046c303c5ea5bef7f6af8462d9702 to your computer and use it in GitHub Desktop.
RustRusotoRocket_DynamoUserCrudNew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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