|
|
|
|
|
by tjbiddle
2857 days ago
|
|
Not OP, but to elaborate on AWS Step Functionss: In short - this gives you the ability to pass the output of one lambda function to the input of another lambda function. An example of one that I've written to regularly create a new copy of our Production RDS database in Ireland as a Staging RDS database in Oregon. 1. Cloudwatch Event starts Step Function on the 15th 2. Copy last Production snapshot from Ireland to Oregon 3. Restore this snapshot as a new RDS instance (It will fail until the snapshot is available and retry with exponential backoff - this is a step function feature) 4. In parallel: - Add tags to the instance (Once it's available)
- Delete the snapshot copy (When finished restoring)
- Modify the new instance with security groups and subnets
- In parallel:
- Run a SQL query to anonymize all of PII columns for GDPR compliance as data has now left the EU.
- Call out to the Cloudflare API to update our DNS entry with the new RDS endpoint.
- Delete the old Staging database instance
|
|