aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

[Feature Request] Add an .ignore file support

Open namboodiri opened this issue 7 years ago • 7 comments

It would be great to ignore some files when syncing files using s3 sync, similar to the .gitignore file in git.

namboodiri avatar Aug 24 '18 05:08 namboodiri

@namboodiri This seems reasonable. Are you currently using the --exclude parameters to ignore files.

justnance avatar Aug 29 '18 20:08 justnance

I have been using that. But it would be a lot easier to have a file in the project and define the excluded files in it rather than having to specify it with the command each time.

namboodiri avatar Aug 30 '18 04:08 namboodiri

+1 to that. I see great potential in that feature. You maybe manage your files inside an IntelliJ project and you really want to exclude that .idea folder permanently and not upload it by accident.

DBX12 avatar Nov 13 '19 07:11 DBX12

+1. This is a great feature for s3 sync. Many teams are using s3 as a maven repo and excluding files using --exclude/include is really a pain.

mqhub avatar Oct 23 '20 17:10 mqhub

This is a great idea, and will be very helpful when dealing with a large number of excludes. I think it's important that the name is configurable like proposed in #5160 so we can maintain several inclusion/exclusion lists. There are valid cases for this, such a

# Using different filters for different buckets
s3 sync . s3://photos --include-from photos.txt
s3 sync . s3://videos --include-from videos.txt

# Multiple projects sharing a common exclude list
s3 sync dir1 s3://bucket1 --exclude-from ~/excludes.txt
s3 sync dir2 s3://bucket2 --exclude-from ~/excludes.txt

I understand .ignore is proposed as a parallel with .gitignore. It doesn't make sense for the name to be configurable in Git (different use case), but I think it does make sense for S3.

I commented on #5160 that s3cmd supports these exact flags.

rprieto avatar Nov 09 '20 14:11 rprieto

Definitely required feature to secure uploads.

idestis avatar Apr 23 '21 13:04 idestis