Open rgarrigue opened 5 years ago
import json
import subprocess
with open('route53_backup.json', 'r') as file:
data = json.load(file)
for zone in data['Zones']:
zone_id = zone['Id']
records = zone['Records']
for record in records:
record_type = record['Type']
name = record['Name']
value = record['Value']
cmd = f"awless create record -z {zone_id} -t {record_type} -n {name} -v {value}"
subprocess.call(cmd, shell=True)
Hi
Just wanted to know if anyone tried to backup & restore route 53 zones and records using awless ? I know I can
awless list records --output=json
, but not sure if I can re-create from this json. Anyone got any experience on this ?Best regards,