25 lines
1.1 KiB
Markdown
25 lines
1.1 KiB
Markdown
---
|
|
title: "s3 copy recursive"
|
|
seo_description: "short snippet explaining how to upload folders recursivly to s3 from the cli"
|
|
date: 2022-03-03T21:39:59+01:00
|
|
draft: false
|
|
snippet_types:
|
|
- aws
|
|
- s3
|
|
---
|
|
|
|
Where were you **--recursive** when I was hacking around with
|
|
**for file * ; do aws s3 cp \$file.....**
|
|
|
|
```shell
|
|
$ aws s3 cp ./ s3://travisshears.images/image-service/images/oblastle/context/ --profile personal --recursive
|
|
upload: ./us-ak.jpg to s3://travisshears.images/image-service/images/oblastle/context/us-ak.jpg
|
|
upload: ./us-co.jpg to s3://travisshears.images/image-service/images/oblastle/context/us-co.jpg
|
|
upload: ./us-ar.jpg to s3://travisshears.images/image-service/images/oblastle/context/us-ar.jpg
|
|
upload: ./us-ca.jpg to s3://travisshears.images/image-service/images/oblastle/context/us-ca.jpg
|
|
upload: ./us-al.jpg to s3://travisshears.images/image-service/images/oblastle/context/us-al.jpg
|
|
upload: ./us-ct.jpg to s3://travisshears.images/image-service/images/oblastle/context/us-ct.jpg
|
|
...
|
|
```
|
|
|
|
**--recursive** is an easy win to upload a bunch of files to s3.
|