Need help developing a Lambda Function in Terraform for cross account which will update Route53 in the Networking Account

Hi,

I need help developing a Lambda Function in Terraform for cross account which will update Route53 in the Networking Account.

I have Account Factory for Terraform setup to create new accounts. The accounts will have public and private Route53 Zones name .aws..io and entries in the zones should resolve accurately.

The Default Event Bus with Route53 rule is established in the cross account for any zone creation/deletion to get routed to the Networking Account Route53 Zone Event Bus. This part of the infrastructure is complete.

For the infrastructure in the Networking Account, the Lambda Name Server Record Updater needs to update the public and private Route53 Zones named aws..io

This is the part I need help with. I need help developing the Lambda Function with will update Route53 in the Networking Account.

If someone could help me with this I’d really appreciate it. I’ve attached an architecture diagram to give you and idea of what I’m trying to accomplish.

Thank you