errorMessage": "'Neptune' 对象没有属性 'stop_db_cluster"
errorMessage": "'Neptune' object has no attribute 'stop_db_cluster"
下面为我的 lambda 函数给出了以下代码
import boto3
client = boto3.client('neptune') response =
client.stop_db_cluster(DBClusterIdentifier='qa-n1-cluster')
输出如下
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 吗?
pip 安装--升级 boto3
确切地说,您需要 boto 版本 1.11.721 (2020-02-12) 或更高版本。
更改日志:https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md
1.11.721 2020-02-12
Amazon Neptune
This launch enables Neptune start-db-cluster and stop-db-cluster. Stopping and starting Amazon Neptune clusters helps you manage costs for development and test environments. You can temporarily stop all the DB instances in your cluster, instead of setting up and tearing down all the DB instances each time that you use the cluster.
升级您的 boto 版本,并确认您使用的是比这更新的版本。
下面为我的 lambda 函数给出了以下代码
import boto3
client = boto3.client('neptune') response =
client.stop_db_cluster(DBClusterIdentifier='qa-n1-cluster')
输出如下
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 吗?
pip 安装--升级 boto3
确切地说,您需要 boto 版本 1.11.721 (2020-02-12) 或更高版本。
更改日志:https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md
1.11.721 2020-02-12
Amazon Neptune
This launch enables Neptune start-db-cluster and stop-db-cluster. Stopping and starting Amazon Neptune clusters helps you manage costs for development and test environments. You can temporarily stop all the DB instances in your cluster, instead of setting up and tearing down all the DB instances each time that you use the cluster.
升级您的 boto 版本,并确认您使用的是比这更新的版本。