I am copying multiple files to s3 using one command
[ec2-user@ip-172-31-38-250 ~]$ ls *.rpm
1.rpm
2.rpm
3.rpm
how do I copy these 3 rpms in 1 aws cli command?
I tried
aws s3 cp *.rpm s3://mybucket1/rpms/
I got an error
Unknown options: 1.rpm, 2.rpm, 3.rpm,s3://mybucket1/rpms/
You can use filters:
aws s3 cp . s3://mybucket1/rpms/ --recursive --exclude "*" --include "*.rpm"
or with sync:
aws s3 sync . s3://mybucket1/rpms/ --exclude "*" --include "*.rpm"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With