Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup fails for Aurora DB Cluster #14

Open
jeffwask opened this issue Jun 13, 2018 · 1 comment
Open

Backup fails for Aurora DB Cluster #14

jeffwask opened this issue Jun 13, 2018 · 1 comment

Comments

@jeffwask
Copy link

jeffwask commented Jun 13, 2018

I was seeing an issue where the function was failing for an Aurora DB cluster with a configuration like:

Cluster Name: Test-Cluster
Instance Name: Test-DB

When the build_arn_for_id function returns for the cluster, It returns an arn of...

arn:aws:rds:us-east-1:xxxxxxxxxxx:db:test-cluster

...which it cannot find because it doesn't exist. The build_arn_for_id function has a return of...

return "arn:aws:rds:{0}:{1}:db:{2}".format(region, account_number, instance_id)

...with db hard coded in the in the arn string but the input can be a cluster id. For testing purposes, I added a param and conditional to the function to make that variable.

return "arn:aws:rds:{0}:{1}:{2}:{3}".format(region, account_number, rds_type, instance_id)

This seems to resolve the issues and I did some basic testing with a Aurora Cluster and a MySQL database and everything seems to function as expected.

I've only been working with Python (and this function and associated libraries) for a few days so I'm not very comfortable submitting this as a formal pull request in case I'm missing some deeper functionality I haven't come across yet.

I also noticed there were some changes to get_resource_tags merged in recently which happen directly before this call and gets the ID passed to it. I'm not sure if that change affected this. I didn't attempt to pull the prior version and test it.

-Jeff

@seb-steuer
Copy link

Hi @jeffwask

Got exactly the same issue the :db: hardcoded in arn creation doesn't work for cluster
Could you share the code that determines rds_type for your return snippet please?

kind regards
Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants