title: Serverless: Use a custom origin group instead of a single origin
body: <p>I'm trying to set up cloud front via serverless in order to apply the following logic:</p>
  <ul>
  <li>route user request to <a href="http://server1.com/%7Brequest_path%7D" rel="nofollow noreferrer">http://server1.com/{request_path}</a></li>
  <li>if response code != 404, return result</li>
  <li>if response code == 404, route request to <a href="http://server2.com/%7Brequest_path%7D" rel="nofollow noreferrer">http://server2.com/{request_path}</a> and return result</li>
  </ul>
  <p>To achieve this I've already created an origin group in cloudfront, the only missing bit is how to tell serverless to use that origin group in the deployment.</p>
  <p>The only similar thing I've been able to find is this <a href="https://forum.serverless.com/t/aws-cloudfront-origingroup-creation-using-serverless/13147" rel="nofollow noreferrer">https://forum.serverless.com/t/aws-cloudfront-origingroup-creation-using-serverless/13147</a>, which is still unanswered.</p>
  <p>Can anyone point me in the right direction?</p>