I am using the below command to list roles and its working
$ aws iam list-roles --endpoint-url https://xxxs.com
but when I try to create a role, it gives an error.
$ aws iam create-role --role-name demo-role --assume-role-policy-document file://trust.txt --endpoint-url https://xxxs.com
An error occurred (Unknown) when calling the CreateRole operation: Unknown
strangely, the java code is working fine with the same creds and URL