Getting Auth failure Exception for non enabled AWS regions in AWS account.
Closed this issue · 3 comments
attributes = {}
attributes.merge!({
aws_access_key_id: "",
aws_secret_access_key: "",
region: "af-south-1",
provider: 'AWS'
})
ec2 = Fog::Compute.new(attributes)
ec2.servers.all({})
Actual Result:
Getting Fog::AWS::Compute::Error: AuthFailure => AWS was not able to validate the provided access credentials
Expected Result: Should not get the AuthFailure exception in case of in your AWS account. Any of the regions is not Activated/Enabled.
need to give a more specific exception.
I think we are just returning what AWS has told us here. So if they are not more specific about the error, we don't have a good way of knowing if it is related to region enablement or bad credentials for some other reason. Does that make sense?
@geemus checked with AWS SDK getting the same exception for non-enabled AWS regions. not found any other way to deal with it.
Thanks
Thanks for confirming and letting me know. Wish we could help more, but I guess we are kind of stuck.