jckuester / awsweeper

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

[MacOs] Region Override #34

Closed rrcrawford closed 4 years ago

rrcrawford commented 5 years ago

I have a number of users defined in my aws credentials file that I would like to run awsweeper against, but in different regions. I have observed the following behaviour (all done using the --dry-run option)

  1. When my credentials do not contain a region (which is what I want), I get the following response:

    err: Not a valid region:

    That is what I expected. However, when supplying the --region override for any region in which I have resources (along with the relevant --profile), it returns no resources. Running a describe on the resource with the same --profile and --region using the aws cli, I see the resources I expect.

  2. When my credentials do contain a region, everything works fine.

  3. When my credentials do contain a region, and I try to override it with the --region flag, it still just runs against the region defined in the credentials. So the override does not seem to work.

The behaviour I expected was that if I had credentials defined with or without a region, using the --region override would cause awsweeper to honour this override.

jckuester commented 4 years ago

Hi :wave: Sorry for my late reply and sorry for the inconvenience. You are right, this is a bug (and I haven't really tested the region parameter - which I did in the newest release). The bug is now fixed in the newest release https://github.com/cloudetc/awsweeper/releases/tag/v0.4.1