An IAM user is required to be set up to act on behalf with appropriate policies for this, as well as exporting the keys for this user to run any terraform scripts.
I wouldn't reccomend deploying any of this as there are some hard coded elements that wont play fair for everyone, this is more for my learning and documentation.