Search code examples
pythonaws-sdkboto3amazon-neptune

errorMessage": "'Neptune' object has no attribute 'stop_db_cluster"


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')

output is given below

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" ] }


Solution

  • 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