jckuester / awsweeper

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

hangs running in ec2 with admin perms #66

Closed sonderops closed 4 years ago

sonderops commented 4 years ago

Was testing this running in an ec2 instance with admin iam role and it hangs:

./awsweeper --region us-east-1 --dry-run dev.yml 
INFO[0000] using region: us-east-1

Haven't had time to dig into why it would be permanently hanging here. Initial permissions tested were:

"ec2:Delete*",
"ec2:Describe*",
"ec2:Disassociate*",
"ec2:TerminateInstances"

Changed that to an admin role and still hangs. Any ideas?

jckuester commented 4 years ago

Hi @sonderops, what version of awsweeper are you using? How does your dev.yml look like?

sonderops commented 4 years ago

Using the latest version, dev.yml has been tested locally. Tried with a full spectrum of options and with just: aws_instance:

Turns out to be the same inside the container I've made on or off ec2. Passing in env vars with full perms on the account.

Doesn't seem to be a hang on credentials. I've tried with setting env vars, a credentials file, and iam role. I'll start mucking with the code to see what I can find.

sonderops commented 4 years ago

Turns out there is something odd with which container it gets run in. I'll comment if I figure out why.

sonderops commented 4 years ago

For those of you trying to run awsweeper in a container. curl is a dependency.