finding last snapshot using boto
- by shantanuo
I have read the explanation about "describe_cluster_snapshots" from ...
http://docs.pythonboto.org/en/latest/ref/redshift.html#boto.redshift.layer1.RedshiftConnection.create_cluster
It has an option start_time and end_time but there is no way to sort it. How do I get the id of the latest snapshot using boto?
Here is what I have tried but it does not seem to return the last snapshot.
mysnap=conn.describe_cluster_snapshots()
mysnapidentifier=mysnap['DescribeClusterSnapshotsResponse']['DescribeClusterSnapshotsResult']['Snapshots'][-1]['SnapshotIdentifier']