I am using the Amplify package in my react client for the AWS Cognito authorization. To achieve that I need to configure the Cognito credentials in my client like in the below image.
The problem is I should not hard code the Cognito credentials because when I run my pipeline in a different environment a new Cognito user pool will be created with different credentials. So client has to fetch the Cognito credentials from some place like aws SSM and the authorization should work.
What is the best way to fetch the Cognito credentials for the client(Amplify configuration)?