使用IAM配置文件作为身份验证方法连接到Athena

问题描述

我已经可以使用IAM Credentials方法连接到Athena,但是现在我需要使用IAM Profile身份验证方法,因为数据位于另一个Role中。每次运行以下代码,我的R会话都会中断:

  odbc::odbc(),Driver             = "Athena Driver",S3OutputLocation   = "S3OutputLocation",AwsRegion          = "eu-central-1",AuthenticationType = "IAM Profile",Schema             = "historical_data",AwsProfile = "AwsProfile",Workgroup          = "Workgroup"
)

我正在使用Simba驱动程序,.ini文件如下所示:

Trace=yes

[ODBC Data Sources]
Simba Athena=Simba Athena ODBC Driver

[Simba Athena]

# Description: DSN Description.
# This key is not necessary and is only to give a description of the data source.
Description=Simba Athena ODBC Driver DSN

# Driver: The location where the ODBC driver is installed to.
Driver=/Library/simba/athenaodbc/lib/libathenaodbc_sbu.dylib

# The DriverUnicodeEncoding setting is only used for SimbaDM
# When set to 1,SimbaDM runs in UTF-16 mode.
# When set to 2,SimbaDM runs in UTF-8 mode.
#DriverUnicodeEncoding=2

# Connection configurations should be set here.
AwsRegion=[REGION]
Schema=default
S3OutputLocation=[OUTPUT_S3_BUCKET]

### S3 Output Encryption Configurations.
## S3OutputEncOption default is empty indicating no encryption. Other valid values are SSE_S3,SSE_KMS and CSE_KMS.
## S3OutputEncKMSKey default is empty. This property is used if S3OutputEncOption is SSE_KMS or CSE_KMS.
# S3OutputEncOption=
# S3OutputEncKMSKey=

### Authentication related Configurations.
## The valid values for AuthenticationType are: Default,IAM Credentials,IAM Profile and Instance Profile.
## For Default and Instance Profile authentication nothing else need to be provided.
## When IAM Credentials is selected as authentication type,UID and PWD must be provided which correspond to
## IAM access key and secret key. SessionToken is optional,can be used when temporary security credentials are used.
## When IAM Profile is selected as authentication,user may provide a value for the optional AwsProfile property,if
## nothing is provided the default profile will be used to get the credentials.
## The default value for AuthenticationType is IAM Credentials.
AuthenticationType=[AUTHENTICATION_TYPE]
UID=[USERNAME]
PWD=[PASSWORD]
SessionToken=[SESSION_TOKEN]
AwsProfile=[AWS_PROFILE]

### Advanced Configurations
# StringColumnLength=255
# BinaryColumnLength=32767
# MaxCatalogNameLength = 0
# MaxSchemaNameLength = 256
# MaxTableNameLength = 0
# MaxColumnNameLength = 0
# UseSQLUnicodeTypes=0
# UseResultsetStreaming=1

## The default for RowsToFetchPerBlock is 10000 when UseResultsetStreaming is set
## to 1 whereas 1000 when UseResultsetStreaming is set to 0.
## While setting this option with a large value when using the result set streaming
## API can give you better fetch performance,it can also result in higher memory
## usage. This can be mitigated if the ODBC application can retrieve the result set
## from the driver quickly.
# RowsToFetchPerBlock=10000

### Proxy Configurations.
# Default value for proxy scheme is HTTP,valid values are HTTP and HTTPS.
# UseProxy=0
# ProxyScheme=HTTP
# ProxyHost=
# ProxyPort=8080
# ProxyUID=
# ProxyPWD=

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...