errorMessage”:““ Neptune”对象没有属性“ stop_db_cluster”; [英] errorMessage": "'Neptune' object has no attribute 'stop_db_cluster"

查看:110
本文介绍了errorMessage”:““ Neptune”对象没有属性“ stop_db_cluster”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我的lambda函数的代码

The following code is given below for my lambda funciton

import boto3

client = boto3.client('neptune') response =
client.stop_db_cluster(DBClusterIdentifier='qa-n1-cluster')

输出在下面给出


响应:{ errorMessage:'Neptune'对象没有属性
'stop_db_cluster', errorType: AttributeError, stackTrace:[
File \ /var/lang/lib/lib/python3.8/imp.py\ \,第234行,在load_module\n中返回load_source(名称,文件名,文件)\n,
File \ /var/lang/lib/python3.8/imp.py\ ,在load_source\n模块中的第171行= _load(spec)\n,
File \ \,在_load\n中的第702行,
File \ \,第671行,在_load_unlocked\n中,
File \ \,第783行,在exec_module\n中,
File \ \ \,第219行,在_call_with_frames_removed\n中,
文件\ \ /var/task/lambda_function.py\,第4行,在\n响应=
client.stop_db_cluster(DBClusterIdentifier ='qa-n1-cluster')\n,
文件\ /var/runtime/botocore/client.py\,第514行,在 getattr \n中引发AttributeError(\n]}

Response: { "errorMessage": "'Neptune' object has no attribute 'stop_db_cluster'", "errorType": "AttributeError", "stackTrace": [ " File \"/var/lang/lib/python3.8/imp.py\", line 234, in load_module\n return load_source(name, filename, file)\n", " File \"/var/lang/lib/python3.8/imp.py\", line 171, in load_source\n module = _load(spec)\n", " File \"\", line 702, in _load\n", " File \"\", line 671, in _load_unlocked\n", " File \"\", line 783, in exec_module\n", " File \"\", line 219, in _call_with_frames_removed\n", " File \"/var/task/lambda_function.py\", line 4, in \n response = client.stop_db_cluster(DBClusterIdentifier='qa-n1-cluster')\n", " File \"/var/runtime/botocore/client.py\", line 514, in getattr\n raise AttributeError(\n" ] }


推荐答案

stop_db_cluster()和start_db_cluster()是较新的API(仅在几周前发布)。您能验证您使用的是最新版本的boto3吗?

stop_db_cluster() and start_db_cluster() are newer APIs (only released as of a couple of weeks ago. Can you please validate that you're on the latest version of boto3?

pip install --upgrade boto3

pip install --upgrade boto3

这篇关于errorMessage”:““ Neptune”对象没有属性“ stop_db_cluster”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆