This repository includes sample configurations for a redundant VPN between a UniFi Security Gateway (USG) and AWS Virtual Private Cloud (VPC). There are samples for both static and dynamic (BGP) configurations. You need to fill in the place holders in the correct template, and save it as config.gateway.json on your controller as described in the Ubiquiti Documentation.
There is supporting blog post about the configuration on my blog. By the way, if you need set up a VPN on the EdgeRoute, there are instructions in the Ubiquiti Documentation.