Creating a Cognito user pool client with CloudFormation template

We will follow the AWS CLI command option to create the corresponding CloudFormation template, in order to create the app client.

The Resources and Outputs sections should look as follows:

Resources:
MyUserPoolClient:
Type: AWS::Cognito::UserPoolClient
Properties:
ClientName: 'My Cognito User Pool Client'
ExplicitAuthFlows:
-USER_PASSWORD_AUTH
RefreshTokenValidity: 30
UserPoolId: !ImportValue MyFirstUserPoolId
Outputs:
ClientId:
Description: 'Cognito user pool Client'
Value: !Ref MyUserPoolClient

We can also add a template format version and a description.

We can now create the CloudFormation stack with the user pool client, by executing the aws cloudformation create-stack command. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.252.204