What is DynamoDB?
Dynamo DB characteristics
DynamoDB pricing
DynamoDB data model
Simple DynamoDB architecture
xxxxxxxxxx
Amazon DynamoDB is a fully managed proprietary NoSQL database service that provides fast and predictable performance with seamless scalability.
It supports key-value and document data structures
DynamoDB allows users to create tables for your database to store and retrieve any data volume and to support any request traffic level.
It is a fast and flexible NoSQL DB for applications that need consistent single-digit milliseconds at any scale. It is a fully managed database and supports both document and key-value data models.
Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale.
xxxxxxxxxx
@Configuration
@EnableDynamoDBRepositories
(basePackages = "com.baeldung.spring.data.dynamodb.repositories")
public class DynamoDBConfig {
@Value("${amazon.dynamodb.endpoint}")
private String amazonDynamoDBEndpoint;
@Value("${amazon.aws.accesskey}")
private String amazonAWSAccessKey;
@Value("${amazon.aws.secretkey}")
private String amazonAWSSecretKey;
@Bean
public AmazonDynamoDB amazonDynamoDB() {
AmazonDynamoDB amazonDynamoDB
= new AmazonDynamoDBClient(amazonAWSCredentials());
if (!StringUtils.isEmpty(amazonDynamoDBEndpoint)) {
amazonDynamoDB.setEndpoint(amazonDynamoDBEndpoint);
}
return amazonDynamoDB;
}
@Bean
public AWSCredentials amazonAWSCredentials() {
return new BasicAWSCredentials(
amazonAWSAccessKey, amazonAWSSecretKey);
}
}
It is a nonrelational database i.e a NoSQL DB. It is a managed service, i.e you do not need to tune or manage it in any way, AWS does this for you.
a single Dynamo DB table will be used to persist image details. All interactions with DynamoDB will happen via the Lambda functions.
Nodejs read env file
xxxxxxxxxx
npm install dotenv --save-dev
Axios read env file