have you considered using https://github.com/hashicorp/terraform-exec to run terraform inside you go process to manage the entire AWS connection piece. Terraform being largely rock solid and frequently updated on this.
could make this considerably more robust.