Trying to assign multiple users to groups using json. Created a json file, and runnign the following:
aws iam add-user-to-group --cli-input-json file://c:\awscli\json\iam-add-user-to-group.json
Json content is:
{
"GroupName": "devops",
"UserName": ["devop1", "devop2"]
}
and getting an error:
Parameter validation failed:
Invalid type for parameter UserName, value: ['devop1', 'devop2'], type: <class 'list'>, valid types: <class 'str'>
With the community help, changed incorrect json, and realized - there is no way to run any bulk add/remove scripts in AWS CLI.
That's not a valid JSON. This is: