How to do it...

We can create a user pool client with ADMIN_NO_SRP_AUTH enabled and use it for server-side admin authentication flow as follows:

  1. Create a user pool client with an explicit authentication flow as ADMIN_NO_SRP_AUTH:
aws cognito-idp create-user-pool-client \    --user-pool-id us-east-1_Q1cydt6I0 \    --client-name MyClientForServerSideFromCLI \    --explicit-auth-flows ADMIN_NO_SRP_AUTH \    --region us-east-1 \    --profile awssecadmin

This should provide a response as follows:

  1. Create a user:
aws cognito-idp admin-create-user \     --user-pool-id us-east-1_Q1cydt6I0 \     --username testuser \     --temporary-password Passw0rd$ \ --profile awssecadmin ...

Get AWS Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.