Comments (5)
Perfect timing, I was trying to get this too work last night and am having exactly the same issue.
Latest snapshot found: 'rds:dr4r6hb7p917va-2018-01-18-15-05' from 2018-01-18 15:06:09.565000+00:00
Latest snapshot found: 'rds:dr4r6hb7p917va-2018-01-18-15-05' from 2018-01-18 15:06:09.565000+00:00
15:12:16
Checking if 'dr4r6hb7p917va-us-east-1-rds:dr4r6hb7p917va-2018-01-18-15-05' already exists in target region
Checking if 'dr4r6hb7p917va-us-east-1-rds:dr4r6hb7p917va-2018-01-18-15-05' already exists in target region
15:12:16
dr4r6hb7p917va-us-east-1-rds:dr4r6hb7p917va-2018-01-18-15-05 is already copied to us-west-2
dr4r6hb7p917va-us-east-1-rds:dr4r6hb7p917va-2018-01-18-15-05 is already copied to us-west-2
15:12:17
No snapshots for database dr4r6hb7p917va found in target region: Exception Traceback (most recent call last): File "/var/task/index.py", line 101, in lambda_handler remove_old_snapshots(message['Source ID']) File "/var/task/index.py", line 68, in remove_old_snapshots raise Exception("No snapshots for database {} found in target region".format(instance_name)) Exception: No snapshots for
No snapshots for database dr4r6hb7p917va found in target region: Exception
Traceback (most recent call last):
File "/var/task/index.py", line 101, in lambda_handler
remove_old_snapshots(message['Source ID'])
File "/var/task/index.py", line 68, in remove_old_snapshots
raise Exception("No snapshots for database
{}
found in target region".format(instance_name))
Exception: No snapshots for database dr4r6hb7p917va found in target region```
from aws-maintenance.
I think the issue is where that copy_name is being built up and coming out as dr4r6hb7p917va-us-east-1-rds:dr4r6hb7p917va-2018-01-18-15-05
this string contains a :
which is not a valid char for the target name.
This then means the error being returned when it tries to do the copy action does not match the exception that is looking for "DBSnapshotNotFound" and it moves on past straight to print("{} is already copied to {}".format(copy_name, TARGET_REGION))
If I try and and perform the same copy in the console using the name generated I get this following error:
https://i.imgur.com/pr6jGM6.png
from aws-maintenance.
Hi both,
Thanks for the report. I'm looking into this now.
@fsantarelli - you mentioned that the stack creation failed in the target region? Can you raise another issue with more details about this?
from aws-maintenance.
Hi @pbudzon - thanks for your message, I can definitely raise another issue regarding the region issue.
from aws-maintenance.
You were correct, the : in the naming was causing an error. I pushed a fixed code which replaces that with a hyphen, which is an allowed character. The CloudFormation template is updated, so all you should need to do now is update your stacks and it should be working.
If you want to do some manual testing in the Lambda console, an example event (replace the database name with your own, everything else is ignored):
{
"Records": [
{
"EventVersion": "1.0",
"EventSubscriptionArn": "arn:aws:sns:EXAMPLE",
"EventSource": "aws:sns",
"Sns": {
"Type": "Notification",
"MessageId": "abcd",
"TopicArn": "arn:aws:sns:eu-west-1:123456789012:topic_name",
"Subject": "RDS Notification Message",
"Message": "{\"Event Source\":\"db-instance\",\"Event Time\":\"2017-12-26 22:34:07.882\",\"Identifier Link\":\"https://console.aws.amazon.com/rds/home?region=eu-west-1#dbinstance:id=database_name\",\"Source ID\":\"PUT_YOUR_RDS_NAME_HERE\",\"Event ID\":\"http://docs.amazonwebservices.com/AmazonRDS/latest/UserGuide/USER_Events.html#RDS-EVENT-0002\",\"Event Message\":\"Finished DB Instance backup\"}",
"Timestamp": "2017-12-26T22:35:19.946Z",
"SignatureVersion": "1",
"Signature": "xxx",
"SigningCertURL": "xxx",
"UnsubscribeURL": "xxx"
}
}
]
}
Thanks for the report!
from aws-maintenance.
Related Issues (15)
- Retention Policy for the Snapshots HOT 2
- Error In Cross Copy HOT 3
- KMSKeyNotAccessibleFault HOT 5
- Issues with snapshots deleting HOT 1
- Resource import error HOT 2
- AccessDenied HOT 9
- Cross Region RDS Backup Copy CFN Not working HOT 3
- RDS-SnapshotQuotaExceeded HOT 1
- RDS-snapshot: Trigger with Event Bridge + cron failed
- CloudFormation stack fails if created in non-source region HOT 5
- Cross-region RDS backup copy fails with encrypted snapshots HOT 3
- CF creation fails with new instructions HOT 6
- Issue in taking snapshot HOT 2
- Aurora support HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-maintenance.