IdentityPool Creation with CloudFormation

Viewed 1163

I'm attempting to follow along with a tutorial located at http://serverless-stack.com/chapters/create-a-cognito-identity-pool.html for identity pool creation and document the creation by using cloudformation so that I can easily undo everything when I am done. However, I am having trouble finding any examples that show how to effectively do this using the template syntax. What I currently have is the following

ScratchUserPool:
      Type: AWS::Cognito::UserPool
      Properties:
        UserPoolName: notes-user-pool

ScratchUserPoolClient:
  Type: AWS::Cognito::UserPoolClient
  Properties:
    ClientName: notes-client
    ExplicitAuthFlows: [ADMIN_NO_SRP_AUTH]
    UserPoolId:
      Ref: ScratchUserPool

ScratchIdentityPool:
  Type: AWS::Cognito::IdentityPool
  Properties:
    IdentityPoolName: ScratchIdentityPool
    AllowUnauthenticatedIdentities: false
    CognitoIdentityProviders:
      - ClientId:
          Ref: ScratchUserPoolClient
        ProviderName:
          Ref: ScratchUserPool

The deployment step is failing when it attempts to create the ScratchIdentityPool. I get an error stating that:

An error occurred while provisioning your stack: ScratchIdentityPool - Invalid Cognito Identity Provider (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: InvalidParameterException; Request ID: bc058020-663b-11e7-9f2a-XXXXXXXXXX)

Am I not referencing the Client or Provider name correctly?

1 Answers
Related