I can grant specific permissions to a specific file easily, like this:
Set-S3ACL -BucketName "bucket" -Key "file.txt"
However, now I'm trying to do it for all the files:
Set-S3ACL -BucketName "bucket" -Key "*"
This does not work and it throws:
Set-S3ACL : The specified key does not exist.
What is the valid syntax in this case?
If you need to recursively apply the function to every file, you can achieve that with
Get-ChildItem
to get all of the files in a folder, and usingRecurse
to also search subfolders. Then loop those results and call the function for each one.