// Set the owner id to self to avoid getting snapshots from other accounts.
request.withOwnerIds(Arrays.<String>asList("self"));
if (snapshotIds != null) {
request.setSnapshotIds(Arrays.asList(snapshotIds));
}
DescribeSnapshotsResult result = ec2Client.describeSnapshots(request);
List<Snapshot> snapshots = result.getSnapshots();
LOGGER.info(String.format("Got %d EBS snapshots in region %s.", snapshots.size(), region));
return snapshots;
}