AWS Cloud Developer: FullStack -Storing Data in the Cloud Flashcards
Why store data in a database and not in a file?
files:
file storage doesn’t scale well (concurrency)
Race conditions
Slow Read and Write speed
Search Speed:
Files have slow search speeds (On) compared to databases which store data as a tree structure (O log n), they also contain indexes and bloom filters which further speeds up search
NoSQL
Not Only SQL
Stores data as key: value pairs
Data is flexible and fields can be added or removed at runtime
easier to scale-out
DynamoDB, MongoDB, Cassandra
SQL
Structured Query Language
Store data in relational tables
Models must be defined upfront
Models are heavily normalized (data isn’t repeated)
easier to scale up
AWS RDS, MySQL, PostgresSQL
B-Tree
a generalization of a binary search tree, which stores sorted data, but can have more than 2 child nodes.
Bloom Filters
a data structure that is useful for determining if an item is probably in a data set, or definitely not in the data set. Bloom filters don’t actually store the data themselves.
primary key and foreign key
The primary consists of one or more columns in a table that are unique to each record (each row). A foreign key in a table contains the primary key of another table.
Signed Urls
SignedURLs allow clients to send and receive data by directly communicating with the file store. This saves the server from using its bandwidth to serve as the intermediary that transmits data to and from the client. This is faster for clients as well.
What is the AWS filestore
S3 buckets: A directory-like system in which to store data
CORS
CORS: Cross Origin Resource Sharing: defines how a client can interact with a resource, and what the client can and cannot do with that resource. Setting the CORS policy of our S3 bucket allows our client to communicate with the S3 bucket using the SignedURL pattern.
HIPPA
HIPPA: HIPAA (Health Insurance Portability and Accountability Act) is a law in the U.S that requires data privacy and security for medical information.
IAM service role
IAM service role: an IAM role gives a service a set of permissions to access one or more services.
Access to data should be…
revocable
limited (least privilege)
Two different categories of IAM
users and services
How should policies be assigned?
It’s beneficial to create a role that contains a policy group (a set of permissions), rather than to assign individual permissions to a specific user. Imagine if a user leaves the company and a new hire takes their place. Instead of re-assigning all the permissions needed for their job, we can assign the existing IAM role to that new employee.
How to install Amazon WEb Services credentials locally?
type “aws configure” in cli