pbudzon/aws-maintenance

CF creation fails with new instructions

Closed this issue ยท 6 comments

Hi @pbudzon

I followed your new instructions to enable the cross-region copy of encrypted RDS snapshots: I've created a new key in the destination region, downloaded the lambda python file, added it to a S3 bucket in the source region, downloaded the JSON file and changed the S3 bucket name in it, but when I try to create a new CF stack it fails.

image

Many thanks!

Ah... Can you try zipping the file (the file itself, not a directory it's in) and upload the zip into S3 instead of the py file. In the CF template, locate this line:

"S3Key": "backup-rds.py"

and change that to whatever your ZIP file is named.

If you upload the file into a directory in S3, you need to provide a whole path in S3Key, like my_directory/backup-rds.zip.

Let me know if that works and I'll update the instructions in README. Sorry for the trouble!

You're a ๐ŸŒŸ!

I'm about to test the lambda function now, will let you know how it goes.

Weirdly it is failing with the following error:

{
  "errorMessage": "Unable to import module 'index'"
}

I checked and there's no import index in the python file. Do you want me to raise another issue?

Ugh... importing files into Lambda... my bad. I pushed a fix into the code, please use the new CF template to update your stack (replace S3Bucket just like before). I tested this now and it should be working :)

Woohooo! ๐ŸŒŸ ๐ŸŒŸ ๐ŸŒŸ ๐ŸŒŸ ๐ŸŒŸ

image

The snapshot is already being created in the destination region.

This is absolutely amazing, thank you so much!

No problem, happy it's working for you! ๐ŸŽ‰