0

I'm using AWS S3 component to store and distribute files.

I have a bucket called "mybucket" and with a single folder where each file has a daily iso date in it:

mybucket/1967-01-01.csv,
mybucket/1967-01-02.csv,
mybucket/1967-01-03.csv,
...
mybucket/2022-10-23.csv
mybucket/2022-10-24.csv

For certain users arns, I want to only allow access to a set date range, 1980-01-01 to 1990-12-31.

Is there an easier way to do this instead of creating a long resource list?

        "Resource": [
            "arn:aws:s3:::mybucket/1980*",
            "arn:aws:s3:::mybucket/1981*",
            ...
            "arn:aws:s3:::mybucket/1990*"
        ]

The only other solution I could come up with is to have two buckets and two sets of files, however this is not ideal.

pyCthon
  • 11,746
  • 20
  • 73
  • 135

0 Answers0