title: Custom Domain on Cognito
body: <p>I would like to setup a custom domain for Cognito.( it's on App Integration -> Domain Name). I am trying to follo this: <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html#cognito-user-pools-add-custom-domain-adding" rel="nofollow noreferrer">https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html#cognito-user-pools-add-custom-domain-adding</a>, but I am little bit confused on step 3.</p>
  
  <blockquote>
    <p>On step 3: To set up a custom domain name or to update its
    certificate, you must have permission to update Amazon CloudFront
    distributions. You can do so by attaching the following IAM policy
    statement to an IAM user, group, or role in your AWS account:</p>
  </blockquote>
  
  <p>I need to "attach" a permission for Cognito to create a Cloud Front Distribuition, but the documentation didn't say how to do it.</p>
  
  <p>I have created a role with trust relantionship for cognito id... But it's still not able to create cloud front...And no error message...</p>