AWS CLI - S3 how to replace a folder atomically?

Viewed 3776

So,

Let's say I have a folder called /example in S3. This folder contains a file called a.txt.

using AWS CLI, how do I upload a local folder, also called example, and replace the current S3 /example atomically. The local folder contains a file called b.txt.

So, I want the behaviour to be that the new S3 /example folder only contains b.txt.

Basically, is there a way to atomically replace an entire folder in S3 with a new one via the AWS CLI?

Thank you!

1 Answers
Related