【问题标题】:errorMessage“: ”'Neptune' object has no attribute 'stop_db_cluster"errorMessage“: ”“海王星”对象没有属性“stop_db_cluster”
【发布时间】:2020-03-12 13:34:58
【问题描述】:

即使在boto3版本1.12.19更新版本上也没有运行

依赖这张票,errorMessage": "'Neptune' object has no attribute 'stop_db_cluster"

【问题讨论】:

  • 我进行了编辑,将标签从 neptune 更改为 amazon-neptune。这样一来,更多人可能会发现您的帖子。

标签: boto3 amazon-neptune


【解决方案1】:

我已经使用 boto3 版本 1.12.19 成功测试了 Amazon Neptune API,如下所示:

我的示例代码:

import json
import boto3

def main():

    session = boto3.Session(profile_name='syumaK')
    # Any clients created from this session will use credentials
    # from the [syumaK] section of ~/.aws/credentials.

    NeptuneClient = session.client('neptune')

    # print(boto3.__version__)

    response = NeptuneClient.start_db_cluster(
        DBClusterIdentifier='syumak-test-cluster'
    )

    print response


if __name__ == '__main__':
    main()

我的示例回复:

解决步骤:

1.查看 boto3 的当前版本:

pip show boto3

>>> import boto3
>>> boto3.__version__

如果输出低于当前版本 (1.12.19 ) 然后继续升级您的 boto3 版本,如下所示。

2.升级你的 boto3:

pip install botocore --upgrade
pip install boto3 --upgrade

注意:您需要注销才能使更改生效

希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 2020-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-12
    相关资源
    最近更新 更多