- 最新
- 投票最多
- 评论最多
I would recommend creating an inventory report for the bucket, as long as you don't need a real time view of the data. Reports can be configured to be generated daily or weekly:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/configure-inventory.html
You can configure additional fields including last modified date. You can then query the report using Athena:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory-athena-query.html
Greetings,
In the AWS Management Console, you cannot directly sort or filter S3 objects by their modified date. The S3 console has limited functionality for filtering and sorting objects. However, you can work around this limitation by using the AWS CLI or SDKs to list, filter, and sort objects in an S3 bucket based on their modified date or other attributes.
Here's an example using the AWS CLI to list objects in an S3 bucket sorted by the modified date:
Install and configure the AWS CLI on your local machine, if you haven't already.
Run the following command to list objects in your S3 bucket, sorted by the modified date:
aws s3api list-objects --bucket YOUR_BUCKET_NAME --query "sort_by(Contents, &LastModified)"
Make sure you replace YOUR_BUCKET_NAME with the name of your S3 bucket. This command will return a JSON output with objects sorted by the LastModified attribute. You can further customize these commands to filter and sort the objects based on your requirements.
Note that if your bucket has a large number of objects, you might need to handle pagination using the --max-items and --starting-token parameters. Refer to the AWS CLI documentation for more information on handling pagination: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-pagination.html
Please let me know if I answered your question
相关内容
- AWS 官方已更新 9 个月前
please let me know if I answered your question by selecting my question as Accepted Answer
Greetings, Please let me know if I answered your question and select my answer as Accepted Answer