I spoke with AWS support, and it seems that it is impossible to prevent the creation of the backup when creating the instance. This is due to how the backup is created when creating / updating (this is part of the automatic backup process) and the ability to manage this function is limited (turn it on and off, but only for existing instances).
Here are a few more details if anyone else is facing the same problems as me.
I am interested in two scenarios:
- Do not back up in RestoreDBInstanceFromDBSnapshot request
- Do not back up in ModifyDBInstance request
Backups are managed by this flag:
BackupRetentionPeriod = 0
Unfortunately, this flag is part of the instance and snapshot, but can only be set on the instance. Therefore, in order to create an instance with this set of flags (and therefore not a reserve), the snapshot would have to disable this flag. This can only happen if the source instance has disabled this flag. At this stage, we could consider switching the flag to the original instance when shooting, however disabling and re-enabling this flag has negative side effects, including:
There is a way to disable automatic backups for existing instances however we highly discourage against this because it disables point-in-time recovery. Once disabled, re-enabling them will only restore the backups starting from the time you re-enable automatic backups.
We will lose all existing backups of the original instance. The end result is that there is no effective way to avoid creating the first backup when creating an instance from a snapshot.
When updating an existing instance, itβs better to receive news, since we can disable backups as part of the ModifyDBInstance request:
https:
Of course, it still suffers from losing backups; however, my initial goal was to be able to create and modify snapshots of production databases, use them for a short period of time (hours), and then discard them. Avoiding external backups reduces the overhead in this process.
Hope this information is useful to someone else!