a snippet of code to change the AWS ip dynamically