cevoaustralia / cevoaustralia/aws-backup-lambda
Backup fails for Aurora DB Cluster
- Dominant language
- Python
- Stars
- 58
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating build_arn_for_id and inspecting how get_resource_tags passes the resource ID into it. Verify the ARN construction for both an Aurora cluster and a MySQL database, including whether the recent get_resource_tags change matters; done means backups can find and process both resource types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, mysql, python
- Domain
- cloud, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100