2

I'm using boto3 to export an RDS snapshot to S3 parquet. When creating an S3 export from an RDS snapshot, you have to specify the ExportTaskIdentifier. If you've run an export previously with an identifier and try to use it again, an error is thrown:

ExportTaskAlreadyExistsFault: An error occurred (ExportTaskAlreadyExists) when calling the StartExportTask operation: The export task with the ID xxxxx already exists.

It doesn't matter if the previous export is completed. As long as the ExportTaskIdentifier was used in the past, you can't use it again.

In the cli I can use aws rds describe-export-tasks to show all past completed exports but I see no way to remove past exports or do any kind of cleanup of the export metadata.

Is there any way to re-use an ExportTaskIdentifier? The identifier is used to name the export in the S3 bucket, so re-using would allow me to basically write exports to the same location rather than in a new location each time an export is run.

damontal
  • 29
  • 2

2 Answers2

0

How about adding a datetime stamp to your identifier? The ExportTaskIdentifier only allows ASCII letters, digits and hyphens, and must start with a letter, but you could append a datetime format such as %Y-%m-%d-%H-%M-%S to a standard label. i.e. - db-snapshot-2022-03-29-13-32-35 That should keep them unique.

aured91
  • 23
  • 5
0

Well, someone at AWS has decided that exporting to s3 isn't important, and so only the thinnest support for this potentially powerful feature. In short, nope: no ability to edit or delete export tasks, or perhaps create export task templates that ... nah. Nope. Nada.

So yeah: export tasks need to have a timestamp or otherwise appended to disambiguate.

Tom Harrison
  • 13,533
  • 3
  • 49
  • 77