question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'RDS' object has no attribute 'stop_db_cluster'

See original GitHub issue

I try to stop a MySQL Aurora cluster using Lambda. According to documentation , the function is simple like this.

def stop_aurora_cluster(cluster_identifier):
	rds = boto3.client('rds')

	response = rds.describe_db_clusters( DBClusterIdentifier=cluster_identifier )

	for instance in response['DBClusters']:
		if instance['Status'] != 'stopped' and instance['Status'] != 'stopping':
			rds.stop_db_cluster( DBClusterIdentifier=cluster_identifier )
			print('Stopping Aurora Cluster: ' + cluster_identifier)
	return

However, I get

'RDS' object has no attribute 'stop_db_cluster': AttributeError
Traceback (most recent call last):
  File "/var/task/test.py", line 81, in lambda_handler
    stop_aurora_cluster(resource_details['resource'])
  File "/var/task/test.py", line 52, in stop_aurora_cluster
    rds.stop_db_cluster( DBClusterIdentifier=cluster_identifier )
  File "/var/runtime/botocore/client.py", line 555, in __getattr__
    self.__class__.__name__, item)
AttributeError: 'RDS' object has no attribute 'stop_db_cluster'

Does it mean AWS Lambda hasn’t supported function stop_db_cluster?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
amithtcommented, Oct 30, 2019

You can upgrade boto to fix the error. pip install --upgrade boto3

0reactions
othmane399commented, Jul 3, 2019

Hi, @noelarz need instructions if you can pls 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'RDS' object has no attribute ... - Stack Overflow
The Problem is with the botocore(0.109.0) library.I upgrade the botocore(1.3.8) library which is required in boto3 to the latest one and it ...
Read more >
StopDBCluster - Amazon Relational Database Service
Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains the DB cluster's metadata, including its endpoints and DB...
Read more >
RDS — Boto3 Docs 1.26.33 documentation - AWS
The status "no-permission" indicates that RDS no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic...
Read more >
AWS RDS Instance/Cluster Stoppage - Elastic
Elastic Cloud. Maximize value and optimize your experience. Deploy everything Elastic has to offer across any cloud, in minutes.
Read more >
Amazon Relational Database Service — rds • paws
As with all Amazon Web Services, there are no up-front investments, and you pay only for the resources you use. This interface reference...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found