CIDARLAB / Fluigi-Cloud

Cloud Framework that powers Fluigi Cloud
BSD 2-Clause "Simplified" License
5 stars 3 forks source link

Automatically Create the S3 Bucket #7

Open rkrishnasanka opened 7 years ago

rkrishnasanka commented 7 years ago

Right now the user has to create the bucket manually in the AWS console. Add a method to the AWS_S3 Controller to:

if bucket exists :
   skip
else:
   create bucket with the environment variable name, with public read
   set the required CORS config 
aonanam commented 7 years ago

I'm not sure how useful this would be. It only impacts those running local Fluigi-Cloud instances, right? Admins may want to customize/manually create their buckets anyway.

I may not be understanding the issue, though.

rkrishnasanka commented 7 years ago

You're right about that. So on startup app.js should check if the bucket exists. Even if you don't add the autocreate it should definitely check if the bucket exists and exit the instance if it doesn't find it.

http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-creating-buckets.html