in lambda/R53Associate.py [0:0]
def disassociate_vpc_from_hosted_zone(vpc_id, phz_id):
try:
logger.info("disassociation {} from hosted zone {}".format(vpc_id, phz_id))
response = r53_client.disassociate_vpc_from_hosted_zone(
HostedZoneId=phz_id,
VPC={"VPCRegion": os.environ["AWS_REGION"], "VPCId": vpc_id},
)
logger.info("disassociation is complete : \n {}".format(response))
except Exception as ex:
logger.error("Error disassociation %s to hosted zone %s : %s", vpc_id, phz_id, ex, exc_info=True)
raise ex