This is my current code:
from [login to view URL] import S3Connection
from [login to view URL] import Key
import sys
conn = S3Connection('____________________', '________________________________________')
bucket = conn.get_bucket('bucketname')
rs = [login to view URL]("FamilyPhotos")
for key in rs:
print [login to view URL]
keys = [key for key in bucket]
latest = max(keys)
latest.get_contents_to_filename()
Currently it doesnt work. I have files in my s3 bucket in a specific folder which have filenames formatted in the following way:
YYYYMMDDHHMMSS
[login to view URL]
[login to view URL]
At the moment there is some pseudo code in there that I am not sure how to replace it with the correct python code. What it is designed to do is establish a connection to my S3 bucket and download a file which has the most recent filename.