Can we use boto to generate last modified datetime of S3 objects

+1 vote
Do we have an API that can help me get the last modified datetime in boto. I wish to focus only on those files that have been changed.  A heads up I am using python script for S3 uploads.
Apr 10, 2018 in Cloud Computing by brat_1
• 7,200 points
5,666 views

1 answer to this question.

0 votes
Okay this code snippet will help you print the last modified entities. Give it a shot.

>>> import boto

>>> s3 = boto.connect_s3()

>>> bucket = s3.lookup('mybucket')

>>> for key in bucket:

       print key.name, key.size, key.last_modified

index.html 13738 2012-03-13T03:54:07.000Z

markdown.css 5991 2012-03-06T18:32:43.000Z

>>>

This may not a be a perfect solution because last modified is a string. You may also consider using boto.utils.parse_ts to parse a string
answered Apr 10, 2018 by hemant
• 5,790 points

Related Questions In Cloud Computing

0 votes
1 answer

Is there a way to find out the number of objects stored in an S3 bucket?

Frankly, that is not possible. This is ...READ MORE

answered Apr 17, 2018 in Cloud Computing by code_ninja
• 6,300 points
924 views
+2 votes
6 answers

Can we download an entire S3 bucket?

Use this command with the AWS CLI: aws ...READ MORE

answered Oct 25, 2018 in Cloud Computing by tryhard
4,378 views
0 votes
1 answer

Can we add AWS IAM users to AWS Cognito Pool?

For now, that seems unlikely. Because if ...READ MORE

answered Apr 18, 2018 in Cloud Computing by brat_1
• 7,200 points
1,101 views
0 votes
1 answer

Can we Use Api keys with AWS API Gateway?

There is no getting away here. When ...READ MORE

answered Apr 18, 2018 in Cloud Computing by hemant
• 5,790 points
561 views
0 votes
1 answer

Is there a way to use amazon ECR image from one account in the code build of another account?

These forums might just help with AWS ...READ MORE

answered May 7, 2018 in Cloud Computing by brat_1
• 7,200 points
1,672 views
0 votes
1 answer

Can we Access AWS SNS service without having access to Secret key and access key?

Yes what you ask for is possible. ...READ MORE

answered May 9, 2018 in Cloud Computing by DragonLord999
• 8,450 points
1,266 views
0 votes
1 answer

Is there a way to use websockets for streaming S3 bucket?

I believe that’s not possible natively in ...READ MORE

answered May 10, 2018 in Cloud Computing by DragonLord999
• 8,450 points
2,133 views
0 votes
1 answer

What are some of the popular DevOps Tools we can use or we should learn?

If you ask me, I would say ...READ MORE

answered Jul 23, 2018 in Cloud Computing by hemant
• 5,790 points
782 views
+3 votes
5 answers

AWS EFS vs EBS vs S3 (differences & when to use?)

EFS is: May not yet be available in ...READ MORE

answered Apr 9, 2018 in Cloud Computing by hemant
• 5,790 points
4,975 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP