jckuester / awsweeper

A tool for cleaning your AWS account
Mozilla Public License 2.0
469 stars 45 forks source link

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

Open kneemaa opened 4 years ago

kneemaa commented 4 years ago

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

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

jckuester commented 4 years ago

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.

aghassemlouei commented 3 years ago

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

jsikarin commented 1 year ago

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