-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidVolume.NotFound error in DescribeVolumes, but can see volume #92
Comments
Different regions would be my first thought, is the backup script configured to use the default region (us-east-1) and your volume is in us-west-2 ? |
I have region set in my .aws file.
|
Could you humour me and use the -r switch to set your region explicitly? |
Absolutely -- and it worked! Any ideas what I should change in configuration that's causing this, though?
|
Lots of possibilities but first I wonder about your AWS CLI setup as your credentials file should be '...in a local file named credentials in a folder named .aws in your home directory' and not in a file called .aws. See https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html. Maybe re-run aws configure to ensure your config is written out correctly, then ensure cron-primer.sh is pointing to your ~/.aws/credentials file and not to .aws ? And that the user running can access that file. You can even export the environment variables to be doubly sure. Having said that the code looks for $EC2_REGION and I'm not sure what sets that (maybe it's a holdover from the old EC2 CLI?) - the current AWS CLI uses AWS_DEFAULT_REGION. |
So what's confusing to me is that there's a file called But when
I've tried passing in I've tried re-running |
There are many others that have posted this as an issue. Change this in the .sh script: #if the environment variable $EC2_REGION is not set set to us-east-1
if [[ -z $EC2_REGION ]]; then
region="us-east-1"
else
region=$EC2_REGION Obviously, you would want to set the default region to whatever region your volumes are in... and then when you don't declare the -r then it will go to the correct region instead of us-east-1 |
I had same issue. Other way around this than the one posted by @kaburkett, is to pass args in order specified by line: |
I'm getting an error when trying to run ec2-automate-backup-awscli.sh. I saw #88 which described a similar issue, but I'm using the cron-primer.sh and .aws file and still getting this error. Here's the output I'm getting.
But when I run aws ec2 describe-volumes, I can see the volume.
The text was updated successfully, but these errors were encountered: