cloud-nuke
cloud-nuke copied to clipboard
ERROR: could not find any enabled regions
Hi Guys!
I made a free account last year and I was planning to use cloud-nuke (via my Windows terminal) to delete all my resources but I got the following message:
ERROR: could not find any enabled regions
after I enter the command: cloud-nuke aws
I am a completely newbie and I just want to close my free account but it seems so hard..
PS: I made a new user in IAM and added AdministratorAccess.
Could someone help me?
Hello,
based on error, cloud-nuke failed to describe available AWS regions, it may be an issue with passed credentials
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
It did not work for me on Windows, no matter how I've tried to pass the credentials. It did work on Linux though with a simple aws configure.
I have had the same experience. running from Windows 10 and 11 in pwsh and cmd. Cloud-nuke would not detect the login credential variables and would just fail to connect and discover regions. running on ubuntu or mac and I've had no issues.
Add aws_region = ap-south-1 (or whatever region) on my aws credential config file works for me
vi ~/.aws/credentials
[user1]
aws_access_key_id = my_access_key_id
aws_secret_access_key = my_secret_access_key
aws_region = ap-south-1
Deletion of multiple regions resources works anyway even if you have only one region on credential config file
cloud-nuke aws --region ap-south-1 eu-central-1 eu-north-1
and you can scan and delete resources on all regions too
cloud-nuke aws
For me the solution for this was to only have an ~/.aws/credentials file.
Whenever the env vars are set it is in conflict with the creds file. Maybe a flag to choose precedence would be nice?
Thanks for providing the answer to the original questions. Will close this issue now.