Automating EBS RDS EC2 backups on lambda
Entities with special characters are translated into backup names with only allowed alphanumeric characters and hyphens. Consecutive hyphens are squashed into single character.
Backup names are including hash of entity name, avoiding name collision of entities with different resource ids, but same names
In cases with > 100 rds snapshots in running account, there was an endless loop causing Lambda to timeout.
In case of shelvery backed being marked with shelvery:backup=false
tag, cleanup process would break for rds and rds cluster backups.
RDS Backups and RDS Cluster backups in RDS_COPY_AUTOMATED_SNAPSHOT mode - in case there is no automated snapshots available, rds or rds_cluster backup will fallback to RDS_CREATE_SNAPSHOT mode
If there is no entity available at the time of backup cleanup - backup cleanup will fail. This has been fixed now, as it is not necessity for resource being backed up to be present within AWS account at the time of backup being cleaned up.
This PR has changes to take in consideration value of shelvery:create_backups
tag. Only resources tagged with tag value of 1
, True
, TRUE
or true will get backed up / cleaned up.
by using configuration value shelvery_select_entity
you can select single resource to be backed up, or it's backups to be cleaned up
shelvery:entity_id
is added as tag with value of original resource to shelvery backups. This makes tracing back to original resources possible even when resource is deleted (e.g. you CloudTrail can be searched for this)
Backing up EC2 instances as Amazon Machine Images is now supported. All of the EBS block devices will be included in AMI. AMIs are created with "no reboot" option.
Testing library has been moved from nose
to pytest
. Also, integration tests for EBS volume is added with tests for
To ago around async invocations for sharing and regional copy operations within context of integration tests, SHELVERY_MONO_THREAD
environment variable support has been added. This will make all operations synchronous, when running in CLI mode. Lambda mode, however, does not apply to this.