简体   繁体   中英

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:

  • my-document-alpha
  • my-document-beta
  • my-document-gamma
  • my-document

Or - my-document has:

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

In my opinion different buckets is better so you can have one for each purpose without necessarily pollution your production bucket. It will also help in access control if you have multiple developers working on the project.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM