Search code examples
shellpngblobamazon-cognito

Invalid PNG format in set-ui-customization in aws cognito


I am using below aws cli command to modify the UI.

aws cognito-idp set-ui-customization --user-pool-id us-west-2_XXXXXXX --client-id ALL  --css ".submitButton-customizable{background-color: #0091e1;} " --region us-west-2 --image-file Logo.png

But it is giving me an error that my PNG File is not valid.

I have seen the documentation and found that image-file should have file format Base64-encoded binary data object

I am using Linux Instance (Ubuntu) and running this command from terminal.

How can i correct this?


Solution

  • I had the same problem, try using the fileb://./Logo.png syntax with the --image-file flag, e.g.

    aws cognito-idp set-ui-customization --user-pool-id us-west-2_XXXXXXX --client-id ALL  --css ".submitButton-customizable{background-color: #0091e1;} " --region us-west-2 --image-file fileb://./Logo.png