Set up a database for ScalarDB/ScalarDL deployment on AWS
This guide explains how to set up a database for ScalarDB/ScalarDL deployment on AWS.
Amazon DynamoDB
Authentication method
When you use DynamoDB, you must set REGION
, ACCESS_KEY_ID
, and SECRET_ACCESS_KEY
in the ScalarDB/ScalarDL properties file as follows.
scalar.db.contact_points=<REGION>
scalar.db.username=<ACCESS_KEY_ID>
scalar.db.password=<SECRET_ACCESS_KEY>
scalar.db.storage=dynamo
Please refer to the following document for more details on the properties for DynamoDB.
Required configuration/steps
DynamoDB is available for use in AWS by default. You do not need to set up anything manually to use it.
Optional configurations/steps
Enable point-in-time recovery (Recommended in the production environment)
You can enable PITR as a backup/restore method for DynamoDB. If you use ScalarDB Schema Loader for creating schema, it enables the PITR feature for tables by default. Please refer to the official document for more details.
It is recommended since the point-in-time recovery feature automatically and continuously takes backups so that you can reduce downtime (pause duration) for backup operations. Please refer to the following document for more details on how to backup/restore Scalar product data.
Configure monitoring (Recommended in the production environment)
You can configure the monitoring and logging of DynamoDB using its native feature. Please refer to the official document for more details.
It is recommended since the metrics and logs help you to investigate some issues in the production environment when they happen.
Use VPC endpoint (Recommended in the production environment)
// Note that We have not yet tested this feature with Scalar products.
// TODO: We need to test this feature with Scalar products.
It is recommended since the private internal connections not via WAN can make a system more secure.
Configure Read/Write Capacity (Optional based on your environment)
You can configure the Read/Write Capacity of DynamoDB tables based on your requirements. Please refer to the official document for more details on Read/Write Capacity.
You can configure Read/Write Capacity using ScalarDB/DL Schema Loader when you create a table. Please refer to the following document for more details on how to configure Read/Write Capacity (RU) using ScalarDB/DL Schema Loader.
Amazon RDS for MySQL, PostgreSQL, Oracle, and SQL Server
Authentication method
When you use RDS, you must set JDBC_URL
, USERNAME
, and PASSWORD
in the ScalarDB/ScalarDL properties file as follows.
scalar.db.contact_points=<JDBC_URL>
scalar.db.username=<USERNAME>
scalar.db.password=<PASSWORD>
scalar.db.storage=jdbc