Awad
Awad

Reputation: 921

Different S3 buckets for different environment VS one bucket and different objects for each environment

I migrating my applications to start using S3 but the thing is I am at this point where I am not really sure if the best practice for different environments is to use multiple buckets? Or should I create one bucket with multiple objects for each environment.

like:

Or - my-document has:

  1. alpha/
  2. beta/
  3. gama/
  4. prd/

Upvotes: 3

Views: 3082

Answers (2)

David Odohi
David Odohi

Reputation: 168

Different buckets are better, so you can have one for each purpose without necessarily polluting your production bucket. It will also help in access control if multiple developers work on the project.

Upvotes: 9

Ankit Deshpande
Ankit Deshpande

Reputation: 3604

It is better to have multiple buckets. It is easier to maintain and you can have different sort of settings for each env. Production can have encryption at rest, backups enabled, different lifecycle rules etc.

Having one bucket can lead to unwanted downtimes. Say there is a bug in the code that is writing data in the wrong format or at wrong path, you don't want the test code / env to affect production code / env. Its always better to have environments as isolated as possible.

Upvotes: 3

Related Questions