gingerbreadboy
gingerbreadboy

Reputation: 7769

copying files to s3 without the source folder name

aws s3 cp ./ s3://my-static-sites/a-site-root --recursive --exclude "*" --include "dist/*"

Within my docker-based pipeline I'm trying to get the files in dist/ in to the folder a-site-root/ but I end up with a-site-root/dist/index.html etc.

How do I get index.html (and all my other files in dist/) in to s3://my-static-sites/a-site-root/index.html without the /dist/ path segment?

Upvotes: 0

Views: 313

Answers (1)

Anon Coward
Anon Coward

Reputation: 10827

If you want to copy the dist folder, just specify that as the source:

aws s3 cp dist s3://my-static-sites/a-site-root --recursive

Upvotes: 1

Related Questions