Skip to content

Instantly share code, notes, and snippets.

@jakedowns
Last active November 27, 2023 05:05
Show Gist options
  • Select an option

  • Save jakedowns/eac8ec5bf61f2e4cc6dcae5661bcaca1 to your computer and use it in GitHub Desktop.

Select an option

Save jakedowns/eac8ec5bf61f2e4cc6dcae5661bcaca1 to your computer and use it in GitHub Desktop.
AWS RDS -> DMS -> Kinesis Data Stream -> Kinesis Delivery Stream -> S3 Bucket
RDS -> DMS -> Kinesis -> S3
RDS:
- source database instance
For MySQL:
* binary logging (enable backups)
* binlog_format ROW (create a custom param group and set binlog_format to ROW instead of default MIXED)
DMS:
- role: New DMS_RDS_Kinesis_S3 (IAM) RDSFullAccess, KinesisFullAccess, S3FullAccess
- replication instances (compute for migration task)
- endpoints: source(RDS) & target (KinesisDataStream)
- migration task from {source} to {target}
KINESIS:
- Data Stream
- Delivery Stream {map DataStream to S3}
S3:
- bucket
0. Set Up DMS_RDS_Kinesis_S3 IAM Role with access to the 3 services
1. Make sure you have a bucket set up
2. Make sure you have a RDS Database instance to use
3. Set Up Kinesis Data Stream (MySQL2KinesisDataStream)
4. Set Up Kinesis Delivery Stream (map MySQL2KinesisDataStream to S3 Bucket)
5. Set Up DMS Replicator Instance
6. Set Up DMS Endpoint: Source (point to RDS DB Instance)
7. Set Up DMS Endpoint: Target (point to ARN of MySQL2KinesisDataStream and give ARN of DMS_RDS_Kinesis_S3 IAM Role)
8. Set Up DMS Migration Task: Source to Target
9. Make a change in the DB
10. wait ~ 3 minutes
11. Check DMS Migration Task status to see if your change is recorded
12. Check S3 to see if your change was replicated as json to a file in your S3 bucket
* https://stackoverflow.com/questions/48226472/kinesis-firehose-putting-json-objects-in-s3-without-seperator-comma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment