Load files based on AWS region

So, I have 2 EC2 instances in 2 different AWS regions. Both are installing certain packages.
However, the configuration between both servers is slightly different, based on their AWS region.

What I want to achieve is that depending on the AWS region, I load a different configuration file within a module.
So in the piece below for example, I either want to load the config for Region 1 or config for Region 2.

if you make that call within a custom factor fact, you can pull back the json, convert it to a hash and extract the region information. (or if you ensure that jq and curl are already present on your box before you run puppet, you could put that as is into either a custom or external fact)

For part two, the files vs templates with variables. The way that I would go is with logic and/or variables built into a template if it is a simple difference. If you are using an erb based template, you can reference any variable that is 'in scope' of your template call with @varname inside the erb template. with epp templates, I believe you can pass the values directly as parameter lists which helps make things explicit.