Exporting database snapshots to the Data Platform Landing Zone
This section covers the technical overview of uploading data into the Data Platform from a db instance in AWS. For step by step instructions on how to do this, refer to Ingesting RDS snapshot into the Data Platform Landing Zone guide.
The terraform module db_snapshot_to_s3
will provision the following resources:
After the deployment these resources will export the data from any instance listed in this environment variable by executing the following steps:
- An RDS event subscription is provisioned, which attaches to the defined instance and pushes events to an SNS topic
- When a snapshot of the defined instance is created a message is sent to an SQS queue
- The sent SQS message invokes the export lambda by passing it the RDS instance id
- The export lambda retrieves the last snapshot created for the received instance id and starts an RDS snapshot export task
- Once the export task is started the lambda queues an SQS message with the export task identifier and the RDS export storage bucket name
- The queued message invoked the copier lambda
- The copier lambda checks the state of the export task and once the export is completed, it transfers the exported data into an S3 bucket in the data platform account