awsweeper icon indicating copy to clipboard operation
awsweeper copied to clipboard

error: Must specify Username when calling with non-User credentials

Open kneemaa opened this issue 5 years ago • 3 comments

Error found on certain resource types, so far I've found it for

  • aws_iam_access_key
failed to list awsls supported resources error=ValidationError: Must specify userName when calling with non-User credentials
	status code: 400, request id: [redacted]

Our org uses SAML to generate our local STS tokens which we assign to profiles. Some of the resources require a userName to be set.

This would also be needed if we were to run AWSweeper as a container or scheduled task within AWS.

If this isn't possible, I don't mind submitting a PR to update the README

kneemaa avatar Aug 10 '20 19:08 kneemaa

Hi @kneemaa :wave:

thanks for submitting this issue. If you find more resources where this is the case, please let me know. I don't know yet if I can do anything about it, but will let you know.

jckuester avatar Aug 17 '20 18:08 jckuester

Also observed the same isssue as @kneemaa with literally the same usecase in mind.

aghassemlouei avatar Jan 30 '21 04:01 aghassemlouei

try adding the policy iam:getUser to whichever profile you are running this command from

jsikarin avatar Dec 15 '22 20:12 jsikarin