Boto3无法识别Redshift Data API。

0

【以下的问题经过翻译处理】 当我创建Redshift数据API的boto3客户端时,我遇到了以下错误。 "redshift-data"不在boto识别的服务列表中。为什么boto3尚未识别redshift数据API?我的运行时是Python 3.8。

"errorMessage": "未知服务:'redshift-data'。有效的服务名称是:accessanalyzer、acm、acm-pca、alexaforbusiness、amplify、apigateway、apigatewaymanagementapi、<<及更多...>>...、quicksight、ram、rds、rds-data、redshift、rekognition、resource-groups、resourcegroupstaggingapi、robomaker、route53、route53domains、route53resolver、<<及更多>>。

以下是我的Lambda代码: import boto3 client = boto3.client('redshift-data')

我还尝试了 import botocore.session as bc import boto3 session = bc.get_session() s = boto3.Session(botocore_session = session,region_name ='us-east-1') client = s.client('redshift-data')

profile picture
EXPERT
asked 5 months ago32 views
1 Answer
0

【以下的回答经过翻译处理】 此Lambda函数未使用支持Redshift数据API的boto3版本。请查看此链接,了解不同升级boto3版本的选项。

编辑: 现在Lambda(Python 3.8)中的boto3版本已经支持Redshift Data API。您可以通过文档查看运行时详细信息。

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions