google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
453 stars 89 forks source link

Breakup ebs snapshot copy into multiple methods #370

Closed ramo-j closed 2 years ago

ramo-j commented 2 years ago

Currently there is a single method aws.forensics.CopyEBSSnapshotToS3 which covers a lot of actions. In addition to general readability, this should be broken up into a set up, run and tear down for parallelisation.

Consider the scenario where a implementation wants to copy multiple snapshots in parallel. Multiple invocations will each try to create the IAM components if they do not exist already. If a pause is added between invocations to account for this, the first invocation will create the IAm components, and latter ones will see the IAM roles exist - However, the pause needs to be long enough for EC2 to pick up that the role is available as an instance role.