Database Considerations

Requirements to consider when choosing a database:

https://lh6.googleusercontent.com/QLqVJrcAs_lhDXFFNh0lDOTi0Hzce3CSBT3gg_-DkAL8AzOAw3zMqdTvYBYrn56sPCX69OdI53M7LrmmwCzwnQwddyr6a_xkT34ircWY5e6qpvqynhPssDljTf-88q6AUW3DWvmG

https://lh4.googleusercontent.com/uorqfDEHiOhC-sLAi852kyqPYahb6rHa6mpbk-7E92seTC_yDDPVU4TLlnf3D833wAMpxNYbIwaGv4l8lC9FEMy3iR3BjfXo3j1FTyPopmU6VBnU5tDX7Sst3w29WRvfp9rshIeL

https://lh3.googleusercontent.com/Cwd-bVlDsXdoI5c7hoz91zHUuWfM2uuOFrPjov9p26p6dLjZCdeNlEB_xm7EnEtdjft4tbCeG-ozrRRLX8OIbQf5oiZCD6tTbPxqXWygKIammcrkCGZLDZrsi8TnB1Y7qnpLKVtJ

Amazon Relational Database Service (RDS)

To maintain full control over the database system → Install DB system on EC2 instance (unmanaged).

Database Instance → Isolated database environment, can contain multiple databases. Pick instance class (type of EC2 instance) and instance storage (type of storage used). Also choose DB engine (SQL only) to run.

Billing → DB instance hours, storage, I/O request, provisioned IOPS, backup storage, and data transfer IN/OUT (💵).

Features

Use cases and requirements:

https://lh4.googleusercontent.com/lxUHVcnXtBzG7ZRydGXwuAh4X4Lo3DfjV3muuu9vd8vKuYEZUKht-005SLah-4m3fsPPuv6zMSyNt0zPBeYAakiXFTsDyNYxfyQXLcPvEFGCweUmpTZGPL7y41kcVeNaLtuWhlH8

https://lh4.googleusercontent.com/8-KQ4DMTEMdwqpvUtp0h4MMluNWYkjX1OKuQyE000R-hPcwMF93Sr4aHBedvYvdF5ZGHNTHCr0KqgTs0SgRQsf_aWilJxc6p5yYWWUjaeIxc24R0UIDWd5G1RUgXrARKKgwtN3sg

https://lh4.googleusercontent.com/LR2lgpuoV7YrnS6kfYl_VDaP9jWDFecP_E0JVAdk4r0p2nnhrwnyeu56vsu5MFRjekf2D4pAVIMWJVjIBCpW6Av-ZxjoJ76TnmlKMCVpVBod52CfMk4a87WIA2as7ZkPz7qw4VGR

Instance Types

Each family has a different purpose and best use case:

Storage Types

Storage is EBS-backed, so the EBS storage types can be used:

Security Recommendations

Cost Optimization

Amazon DynamoDB

DynamoDB is a non-relational (key/value) database with virtually unlimited storage, low-latency queries, and scalable read/write throughput (can be provisioned or automatic scaling). Some characteristics are:

Features:

Recommendation is to have compound keys with partition keys that have a high-cardinality attributes (such as IDs) (source). Not following this can result in “hot” partitions, leading to throttling.