1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 这种情况,往往发生在当ODBC中设置的关键字AwsProfile
对应的配置在.aws/credentials
中缺失的时候。在您的测试环境中,您可能已经设置了AwsProfile=default
,或者完全没有指定该配置文件,就会在凭证文件中查找名为default
的配置。
您应该根据CLI文档在此处中的说明在.aws/credentials
文件中配置凭证。
然后设置与以下内容相似的odbc.ini
:
[ODBC Data Sources]
Athena=Simba Athena ODBC Driver
[Athena]
Driver=/Library/simba/athenaodbc/lib/libathenaodbc_sbu.dylib
AwsRegion=us-west-2
S3OutputLocation=s3://query-results-bucket/testfolder-1
AuthenticationType=IAM Profile
AwsProfile=someprofilename
更新
尽管上述信息是正确的,但在这种特殊情况下,问题出现在Excel和MacOS [Application Sandboxes]中(https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html)。微软的Excel因受到限制,无法读取路径~/.aws/credentials
来检索配置文件凭证。一种解决方法是在Excel沙箱目录sandbox directory内创建.aws
目录,然后将凭证文件硬链接到~/.aws/credentials
。这样就能解决问题并仍然使用原始凭证文件。
mkdir ~/Library/Containers/com.microsoft.Excel/Data/.aws
ln ~/.aws/credentials ~/Library/Containers/com.microsoft.Excel/Data/.aws/
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 3 年前