title: How to set up an OAuth2 Authentication Provider with AWS API Gateway?
body: <p>AWS has an <a href="https://aws.amazon.com/api-gateway/">API Gateway</a>, that makes it pretty easy to set up, manage and monitor your API.
  However, the security authorization settings that you can set for resource methods is limited to AWS-IAM (which to my understanding is an internal vpn role?). </p>
  
  <p>It seems that my research on this subject has been pointing me to setting up an <a href="http://docs.aws.amazon.com/cognito/devguide/identity/identity-pools/">AWS Cognito pool</a>, but when I go to configure one in my aws console, the options for providers are: <code>Amazon</code>, <code>Facebook</code>, <code>Google+</code>, <code>Twitter</code>, <code>OpenID</code>, and <code>Custom</code>. I guess, in that case, I would use <code>Custom</code>? Then setup my own EC2 instance as an OAuth2 Authentication Provider Server. </p>
  
  <p>Given that Oauth2 is so popular these days it surprises me that there isn't an AWS service for this; it seems they've gone the whole OpenId or SAML route instead. It also surprises me that there is a lack of guides on how to quickly setup an Oauth2 Provider in the cloud. </p>
  
  <p>Any help would be appreciated.</p>