Creating IdentityPool with CloudFormation

I try to follow along with the tutorial located at http://serverless-stack.com/chapters/create-a-cognito-identity-pool.html to create an identifier pool and document the creation, using which I can easily undo everything when I finish . However, I am having trouble finding any examples showing how to do this efficiently using the template syntax. I currently have 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 failed while trying to create ScratchIdentityPool. I get an error message:

: ScratchIdentityPool - Cognito (: AmazonCognitoIdentity; : 400; : InvalidParameterException; : bc058020-663b-11e7-9f2a-XXXXXXXXXX)

?

+4
1

, , , . , :

ScratchIdentityPool:
  Type: AWS::Cognito::IdentityPool
  Properties:
    IdentityPoolName: ScratchIdentityPool
    AllowUnauthenticatedIdentities: false
    CognitoIdentityProviders:
      - ClientId:
          Ref: ScratchUserPoolClient
        ProviderName:
          Fn::GetAtt: [ScratchUserPool, ProviderName]

amazon Fn::GetAtt, .

+4

Source: https://habr.com/ru/post/1681192/


All Articles