:sos: hi! I'm getting "... unable to validate AWS ...
# aws
n
🆘 hi! I'm getting "... unable to validate AWS credentials. ..." when trying to execute an
pulumi up
on a stack.
pulumi preview
runs with no problem. I'm dealing with this problem for days, since migrate to new macbook. Did a lot of tests and reinstalls (pulumi, awscli, ...) and the error persists the same. Finally I made a total fresh install (format) on the new macbook with just the minimal requirements to run the project. Still got same multiple errors, like below:
Copy code
...
error: Running program 'my-project' failed with an unhandled exception:
    Error: invocation of aws:index/getPartition:getPartition returned an error: unable to validate AWS credentials. Make sure you have:

     	 • Set your AWS region, e.g. `pulumi config set aws:region us-west-2`
     	 • Configured your AWS credentials as per <https://pulumi.io/install/aws.html>
     	 You can also set these via cli using `aws configure`.
...
error: Running program 'my-project' failed with an unhandled exception:
    Error: invocation of aws:index/getRegion:getRegion returned an error: unable to validate AWS credentials. Make sure you have:

     	 • Set your AWS region, e.g. `pulumi config set aws:region us-west-2`
     	 • Configured your AWS credentials as per <https://pulumi.io/install/aws.html>
     	 You can also set these via cli using `aws configure`.
...
Other times it shows:
Copy code
...
error: Error: invocation of aws:index/getCallerIdentity:getCallerIdentity returned an error: invoking aws:index/getCallerIdentity:getCallerIdentity: 1 error occurred:
    	* getting Caller Identity: RequestError: send request failed
    caused by: Post "<https://sts.amazonaws.com/>": dial tcp: lookup <http://sts.amazonaws.com|sts.amazonaws.com> on [fe80::1272:23ff:fe1d:5731%en0]:53: no such host
...
Everything runs nice on other machines, even at the ci/cd (github actions). I don't know more what can I do. Pls any help would be appreciated.
b
what happens when you run
aws sts get-caller-identity
?
n
I get the expected reply:
Copy code
{
  "UserId": "*****",
  "Account": "******",
  "Arn": "arn:aws:iam::******:user/******"
}
Additional fact: in other project with the similar pulumi/aws setup, basically another project repo, it works just fine.
b
are you using an explicit provider?
n
... looking deeper I found out that the problem occurs on this new macbook pro (M1 chip) when calling: aws.getPartition(), aws.getRegion(), aws.getCallerIdentity()
And no, not using any explicit provider.
m
n
Thanks for the help. I tried many things.. and after all my problem was an unknown DNS IPv6 address at my laptop. After removed everything is working fine again. (I just don't know where it came from)