Manifest file to fetch the latest file from S3 sub folders

I want to fetch teh latest file on yearly basis from S3 bucket .
Eg :Need to fetch the daily latest file .
Bucket path structure : S3/{bucket name}/{folder 1}/{folder 2}/{Year}/{month}/{dates }

Currently i am using below manifest file .
{
“fileLocations”: [
{
“URIPrefixes”: [
“s3://approval-reports-us-west-2-188894616023/S3/2023/”
]
}
],
“globalUploadSettings”: {
“textqualifier”: “"”,
“format”: “CSV”,
“delimiter”: “,”

}
}

but it is giving the data which is sum of all the files of 2023

Is there any way to fetch the latest file from sub folders of S3 bucket?

Hi @shikhakh
are you able to put just the latest file in a folder?
BR

Folder structure is : s3://approval-reports-us-west-2-188894616023/S3/2023/11/7/
And we want to show everyday data on the quicksight dashboard .
Thats the reason i selected the file path till /2023/ in manifest
{
“fileLocations”: [
{
“URIPrefixes”: [
“s3://approval-reports-us-west-2-188894616023/S3/2023/”
]
}
],
“globalUploadSettings”: {
“textqualifier”: “"”,
“format”: “CSV”,
“delimiter”: “,”

}
}

But this is giving latest file .
need some attribute by which we can fetch the latest file form sub folders .

Hi @shikhakh
got that. Thats why i ask if it would be possible to move the last file in a different folder.
BR

Hello @shikhakh, were you able to resolve this issue or move the latest file to a different folder like @ErikG suggested? If not please follow up with any steps you have taken to try and fix this, or let us know what you did to make it work. If we do not hear back in 3 days, I will go ahead and archive this topic. Thank you!

Hello @shikhakh, I am going to archive this topic. If you have any further questions about this, please post a new topic in the community and link this question to provide relevant information. That will ensure you are at the top of the priority list for a response from one of our QuickSight experts. Thank you!