Database migration
AWS - DMS (homogenious and heterogenious source/sink)
Can migrate from RDBMS to DynamoDB, or MongoDB to DynamoDB etc.
CDC - Change Data Capture (or Continous Data Conversion as in AWS)
SCT - Schema Conversion Tool (for heterogenious migration)
RDBMS to DynamoDB migration approaches (AWS doc)
1) Using AWS DMS
2) Use EMR, Amazon Kinesis, and Lambda with custom scripts
Can possibly use DataSync agent to copy data from onPrem to S3
MySQL binlog (cdc ?)
CCreate DMS instance (on EC2), define source and destination endpoints , create migration tasks
To map data to a DynamoDB target, you use a type of table-mapping rule called object-mapping
Caching on AWS
EMR
Amazon EMR is the industry-leading cloud big data platform for processing vast amounts of data using open source tools such as Apache Spark, Apache Hive, Apache HBase, Apache Flink, Apache Hudi, and Presto. Amazon EMR makes it easy to set up, operate, and scale your big data environments by automating time-consuming tasks like provisioning capacity and tuning clusters.
With EMR you can run petabyte-scale analysis at less than half of the cost of traditional on-premises solutions and over 3x faster than standard Apache Spark.
You can run workloads on Amazon EC2 instances, on Amazon Elastic Kubernetes Service (EKS) clusters, or on-premises using EMR on AWS Outposts.
Master Node, Core Node (Data), Task Node (No data, optional)
MasterNode - Single Point of Failure (can setup to save the log in S3, on cluster setup)
AWS Directory Service (like Active Directory)
Connects AWS resources with onPrem AD (AD info below)
ARN - Amazon Resource Name
IAM Policy JSON structure (attach it to a Role; then attach the role to an account or resource
IAM Permissions Boundary - restrict access
Resource Access Manager (RAM)
DNS
Top level, 2nd level domains
Domain Registrar - WHO Database - SOA Record
NS - Name Server Records
A Record - name to IP address
CName (Canonical name) - resolve one domain address to another (like m.<domain>)
A Canonical Name or CNAME record is a type of DNS record that maps an alias name to a true or canonical domain name.
CNAME records are typically used to map a subdomain such as www or mail to the domain hosting that subdomain’s content. For example, a CNAME record can map the web address www.example.com to the actual web site for the domain example.com.
Alias Records - map resource record set in the hosted zone to ELB, Cloud Front, S3 static website.
Simple routing policy - 1 A record with multiple IPWeighted Routing - multiple A records (IP) with different weights (healthcheck if ?)Latency - latency to the region makes the routing decisionFailover - active/passive setup - add health check - which is based on public IP which changes on restart - so make sure you update health check or use dedicated IP)
GeoLocation - based on user location
GeoProximity - complex rules (traffic only) - ignore
Multivalue Answer - Simple Routing with separate IP with health check
VPC
- by default Route Table, NACL & SG (security group) created
- by default NO Subnet, no IG.
Special note - Security Group (SG) - default SG will have an Inbound rule to allow any traffic from the same SG only and outbound rule allowing any traffic to the Internet (outside world) - so if the subnet is public - can connect to the internet from the resource. Note- SGs are stateful (NACL is not)- even if the outbound rule is removed, if inbound is allowed, it can reply back to (outbound) for the same.
Can attach multiple SG to EC2/resources
Default route table (Main) - no public access by default. all subnets will be associated with this by default. (So dont add public route to Main route table)
So create a new Route table and make it as Public by adding a new route out to the internet (from 0.0.0.0/0 to IG) - and associate the subnet which needs to be Public to this route table
<Always keep Main Route table as Private (by not adding a route out to the internet) and use separate public route table>
create instance one in public and one in private subnet - one will have public IP
NACL inbound and outbound rules (default)
NAT instances (1) and NAT Gateways (HA) (Network Address Translation
Create NAT instance (EC2 NAT AMI), disable source/destination check
Then add a route in Main route table to allow internet access via NAT instance
Single point of failure -- so use NAT Gateway
Create new NAT gateway on the public subnet, create an elastic IP (uses ephemeral port) - then add route
DynamoDB - common usecases
No comments:
Post a Comment