I was using the migrate-mongo npm package to create indexes on a 3 node mongo cluster running in AWS. The package required IP addresses to be placed in the config.js
file for the migration to locate the remote cluster. To accomplish this I created a go script to retrieve the IP addresses and update the config file for migrations. The script will use the .aws
credential file on the machine its running on.
The migration package has the following structure