awslabs / rds-snapshot-tool

The Snapshot Tool for Amazon RDS automates the task of creating manual snapshots, copying them into a different account and a different region, and deleting them after a specified number of days
Apache License 2.0
341 stars 146 forks source link

Different Account | Different Regions #70

Closed selected-pixel-jameson closed 3 years ago

selected-pixel-jameson commented 3 years ago

I've followed the steps and configured the lambda functions for cross account snapshot sharing as well as cross region. I've specified a different destination region via DEST_REGION (us-east-2) then the the source region (us-east-1). However, the shared snapshots continue to show up under the same region (us-east-1) as the source region in the destination account.

I made sure that both source and destination CloudFormation stacks were run on the us-east-1 region.

When I investigate the logs I see the following error.

Local copy pending: experience-builder-development-2021-05-10-15-00 (An error occurred (KMSKeyNotAccessibleFault) when calling the CopyDBSnapshot operation: The target KMS key [None] does not exist, is not enabled or you do not have permissions to access it.)
[ERROR] SnapshotToolException: Copies pending: 7. Needs retrying
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 112, in lambda_handler
    raise SnapshotToolException(log_message)
[ERROR] SnapshotToolException: Copies pending: 7. Needs retrying Traceback (most recent call last):   File "/var/task/lambda_function.py", line 112, in lambda_handler     raise SnapshotToolException(log_message)

None of these databases are encrypted. So I'm not sure why this error is being thrown.

I need the snapshots on the source account in us-east-1 to be shared to the destination account in us-east-2.

selected-pixel-jameson commented 3 years ago

Apparently my databases were encrypted.... embarrassing.